1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-07 11:03:55 +00:00

Modified Wide2UTF8, to divide buffer size by 2, when calling WideToMultiByte, if specified

This commit is contained in:
Bryan Roe
2020-02-12 14:43:02 -08:00
parent f3656bebff
commit 05d0617539

View File

@@ -213,7 +213,7 @@ duk_ret_t ILibDuktape_GenericMarshal_Variable_Val_UTFSTRING(duk_context *ctx)
duk_get_prop_string(ctx, -2, "_size"); // [var][ptr][size]
size = duk_to_int(ctx, -1);
ILibDuktape_String_PushWideString(ctx, ptr, size == 0 ? -1 : size);
ILibDuktape_String_PushWideString(ctx, ptr, size == 0 ? -1 : size/2);
return 1;
}