mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-07 19:13:20 +00:00
Fixed Buffer, so if the buffer contains a NULL, the string is truncated at the NULL
This commit is contained in:
@@ -288,7 +288,7 @@ duk_ret_t ILibDuktape_Polyfills_Buffer_toString(duk_context *ctx)
|
||||
if (nargs == 0)
|
||||
{
|
||||
// Just convert to a string
|
||||
duk_push_lstring(ctx, buffer, bufferLen); // [buffer][string]
|
||||
duk_push_lstring(ctx, buffer, strnlen_s(buffer, bufferLen)); // [buffer][string]
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user