Skip to content

Commit

Permalink
Fixed Buffer.prototype.indexOf() on 32bits platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeioex committed Oct 11, 2024
1 parent 8d73f91 commit 58fd07a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/njs_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@ njs_buffer_prototype_index_of(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
}

} else {
to -= str.length - 1;
to -= (int64_t) str.length - 1;

if (from > to) {
goto done;
Expand Down
2 changes: 1 addition & 1 deletion src/qjs_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ qjs_buffer_prototype_index_of(JSContext *ctx, JSValueConst this_val, int argc,
}

} else {
to -= str.length - 1;
to -= (int64_t) str.length - 1;

if (from > to) {
goto done;
Expand Down

0 comments on commit 58fd07a

Please sign in to comment.