Skip to content

Commit

Permalink
fix: i cant code
Browse files Browse the repository at this point in the history
  • Loading branch information
liz3 committed Jan 23, 2024
1 parent ffc4bb8 commit beab8d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/optionals/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static Value bufferResize(DictuVM *vm, int argCount, Value *args) {
buffer->bytes = realloc(buffer->bytes, capacity);
if (capacity > buffer->size) {
size_t added = capacity - buffer->size;
memset(buffer->bytes + added, 0, added);
memset(buffer->bytes + buffer->size, 0, added);
}
buffer->size = capacity;
return newResultSuccess(vm, args[0]);
Expand Down

0 comments on commit beab8d8

Please sign in to comment.