diff --git a/quickjs/ckb_module.c b/quickjs/ckb_module.c index 71703b0..16ad5c1 100644 --- a/quickjs/ckb_module.c +++ b/quickjs/ckb_module.c @@ -119,6 +119,7 @@ static JSValue syscall_load(JSContext *ctx, LoadData *data) { } // no length specified, read to the end if (data->length == NO_VALUE) { + data->length = 0; err = data->func(0, &data->length, data); CHECK(err); }