Skip to content

Commit

Permalink
Update src/vm/datatypes/strings.c
Browse files Browse the repository at this point in the history
Co-authored-by: Jason_000 <[email protected]>
  • Loading branch information
liz3 and Jason2605 authored Nov 7, 2024
1 parent aaac64e commit 21e3d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/datatypes/strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ static Value wrapString(DictuVM *vm, int argCount, Value *args) {
if(string->character_len == -1) {
runtimeError(vm, "String contains invalid UTF-8", argCount);
return EMPTY_VAL;
}
}
char *temp = ALLOCATE(vm, char, string->length + 1);
temp[string->length] = '\0';
memcpy(temp, string->chars, string->length);
Expand Down

0 comments on commit 21e3d17

Please sign in to comment.