Skip to content

Commit

Permalink
fix memrchr invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Feb 7, 2025
1 parent de6b02c commit 8349445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bun.js/bindings/JSBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,8 +1411,8 @@ static int64_t indexOfNumber(JSC::JSGlobalObject* lexicalGlobalObject, bool last
if (last) {
#if OS(LINUX)
#ifdef __GNU_LIBRARY__
const void* offset = memrchr(reinterpret_cast<const void*>(typedVector + byteOffset), byteValue, byteLength - byteOffset);
if (offset != NULL) return static_cast<const uint8_t*>(offset) - typedVector;
const void* offset = memrchr(reinterpret_cast<const void*>(typedVector), byteValue, byteOffset + 1);
if (offset != NULL) return static_cast<const uint8_t*>(offset) - (typedVector);
return -1;
#endif
#endif
Expand Down

0 comments on commit 8349445

Please sign in to comment.