Skip to content

Commit

Permalink
fix: reset length to zero (#20)
Browse files Browse the repository at this point in the history
partial loading requires that length is zero to get real length.
  • Loading branch information
XuJiandong authored Dec 25, 2024
1 parent 7102a45 commit 0916f14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions quickjs/ckb_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0916f14

Please sign in to comment.