Skip to content

Commit

Permalink
Fix minor type-casting defect in TypedArray
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 committed Aug 20, 2024
1 parent 89e66fd commit 7349f96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builtins/BuiltinTypedArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ static Value fastTypedArrayIndexSearch(TypedArrayObject* arr, size_t k, size_t l

uint8_t* buffer = arr->rawBuffer();
auto elementSize = arr->elementSize();
int64_t byteK = static_cast<int64_t>(k * elementSize);
int64_t byteLength = static_cast<int64_t>(len * elementSize);
int64_t byteK = static_cast<int64_t>(k) * elementSize;
int64_t byteLength = static_cast<int64_t>(len) * elementSize;

auto compFn = [](int64_t byteK, int64_t byteLength) -> bool {
if (isForward) {
Expand Down

0 comments on commit 7349f96

Please sign in to comment.