Skip to content

Commit b4bfabd

Browse files
committed
Fix size of new string (0 +1->size +1)
1 parent 2134a33 commit b4bfabd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4207,7 +4207,7 @@ LibraryManager.library = {
42074207
return _strdup(ptr);
42084208
}
42094209

4210-
var newStr = _malloc(0 + 1);
4210+
var newStr = _malloc(size + 1);
42114211
{{{ makeCopyValues('newStr', 'ptr', 'size', 'null', null, 1) }}};
42124212
{{{ makeSetValue('newStr', 'size', '0', 'i8') }}};
42134213
return newStr;

0 commit comments

Comments
 (0)