forked from weaselab/weaseldb
Fix realloc bug in static_format
This commit is contained in:
1 parent
f16cff9126
commit
0e4c526094
1 file changed
+1
-2
+1
-2
@@ -270,7 +270,6 @@ std::string_view static_format(ArenaAllocator &arena, Ts &&...ts) {
|
||||
char *buf = result;
|
||||
(detail::term(ts).write(buf), ...);
|
||||
const int size = static_cast<int>(buf - result);
|
||||
return std::string_view(
|
||||
arena.realloc(result, upper_bound, upper_bound - size),
|
||||
return std::string_view(arena.realloc(result, upper_bound, size),
|
||||
static_cast<std::size_t>(size));
|
||||
}
|
||||
Reference in new issue
Block a user