1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-24 04:04:31 +00:00

Added ability to embed zip packages

This commit is contained in:
Bryan Roe
2020-06-18 19:32:25 -07:00
parent c18f37d17e
commit d65118f357
4 changed files with 65 additions and 17 deletions

View File

@@ -819,7 +819,7 @@ duk_ret_t ILibDuktape_fs_read(duk_context *ctx)
char *srbuf = (char*)Duktape_GetBufferPropertyEx(ctx, 0, "buffer", &srbufLen);
memcpy_s(wrbuf + offset, bytesRead, srbuf + dpos, bytesRead);
duk_push_int(ctx, bytesRead); // [bufferDescriptor][buffer][position]
duk_push_int(ctx, bytesRead + dpos); // [bufferDescriptor][buffer][position]
duk_put_prop_string(ctx, -3, "position"); // [bufferDescriptor][buffer]
duk_push_this(ctx); // [bufferDescriptor][buffer][fs]
duk_get_prop_string(ctx, -1, FS_BUFFER_DESCRIPTOR_PENDING); // [bufferDescriptor][buffer][fs][array]