Skip to content

Commit ad7dd5e

Browse files
committed
Wrong negative condition for our memchr.
1 parent a0257e5 commit ad7dd5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/org/jruby/util/StringSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ else if (m < 1) {
16941694
else if (m == 1) {
16951695
int ys = memchr(yBytes, y, xBytes[x], n);
16961696

1697-
if (ys != 0)
1697+
if (ys != -1)
16981698
return ys - y;
16991699
else
17001700
return -1;

0 commit comments

Comments
 (0)