Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/StringSupport.java
Original file line number Diff line number Diff line change
@@ -926,7 +926,7 @@ private static int strRindex(ByteList str, ByteList sub, int s, int pos, Encodin
t = sub.begin();
slen = sub.realSize();

while (s >= sbeg) {
while (s >= sbeg && s + slen <= sbeg + str.realSize()) {
if (ByteList.memcmp(strBytes, s, subBytes, t, slen) == 0) {
return pos;
}

0 comments on commit 5a353b7

Please sign in to comment.