Skip to content

Commit

Permalink
fix mem
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Downs <brian.downs@gmail.com>
  • Loading branch information
briandowns committed Feb 9, 2024
1 parent 397543b commit 156dd66
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 @@ -802,7 +802,7 @@ static Value camelToSnakeCaseString(DictuVM *vm, int argCount, Value *args) {
temp = SHRINK_ARRAY(vm, temp, char, (string->length * 2) + 1, j + 1);
}

return OBJ_VAL(takeString(vm, temp, strlen(temp)));
return OBJ_VAL(takeString(vm, temp, j));
}

void declareStringMethods(DictuVM *vm) {
Expand Down

0 comments on commit 156dd66

Please sign in to comment.