1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-04 01:23:21 +00:00

1. Fixed valgrind issue

2. Updated child_process, to now have back-parent pointer on completion
This commit is contained in:
Bryan Roe
2021-02-16 21:59:48 -08:00
parent 71b5e588c3
commit ebf06898b2
4 changed files with 53 additions and 13 deletions

View File

@@ -2242,7 +2242,7 @@ duk_ret_t ILibDuktape_fs_readFileSync(duk_context *ctx)
char *buffer = (char*)duk_push_dynamic_buffer(ctx, bufferSize); // [dynamicBuffer]
size_t bytesRead = 0;
size_t len = 0;
while ((bytesRead = fread(buffer + len, 1, 1024, f)) > 0)
while ((bytesRead = fread(buffer + len, 1,(bufferSize-len)>1024?1024:(bufferSize-len), f)) > 0)
{
len += bytesRead;
if (bytesRead == 1024)