1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-06 10:34:09 +00:00

Fixed compiler warning

This commit is contained in:
Bryan Roe
2020-04-30 10:26:12 -07:00
parent a074a17790
commit 8268fdf33a

View File

@@ -160,10 +160,10 @@ duk_ret_t ILibDuktape_Polyfills_Buffer_toString(duk_context *ctx)
#ifdef WIN32
else if (strcmp(cType, "utf16") == 0)
{
int sz = (MultiByteToWideChar(CP_UTF8, 0, buffer, bufferLen, NULL, 0) * 2);
int sz = (MultiByteToWideChar(CP_UTF8, 0, buffer, (int)bufferLen, NULL, 0) * 2);
WCHAR* b = duk_push_fixed_buffer(ctx, sz);
duk_push_buffer_object(ctx, -1, 0, sz, DUK_BUFOBJ_NODEJS_BUFFER);
MultiByteToWideChar(CP_UTF8, 0, buffer, bufferLen, b, sz / 2);
MultiByteToWideChar(CP_UTF8, 0, buffer, (int)bufferLen, b, sz / 2);
}
#endif
else