[jruby-joni] 41/223: Fix for JRUBY-3141: Array index error in JCodings running latest String#rindex specs.

Hideki Yamane henrich at moszumanska.debian.org
Mon Nov 16 11:21:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit 5075f238175f3b609210c8175ea8c1d3a297c0cb
Author: Marcin Mielżyński <lopx at gazeta.pl>
Date:   Thu Nov 13 23:23:22 2008 +0000

    Fix for JRUBY-3141: Array index error in JCodings running latest String#rindex specs.
    
    git-svn-id: http://svn.codehaus.org/jruby/joni/trunk@8068 961051c9-f516-0410-bf72-c9f7e237a7b7
---
 src/org/joni/Matcher.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/org/joni/Matcher.java b/src/org/joni/Matcher.java
index 215f0da..b55b0b4 100644
--- a/src/org/joni/Matcher.java
+++ b/src/org/joni/Matcher.java
@@ -498,7 +498,7 @@ public abstract class Matcher extends IntHolder {
                         if (schStart > end) schStart = end;
                         if (!backwardSearchRange(bytes, str, end, schStart, range, adjrange)) return mismatch(); // low, high
                         if (s > high) s = high;
-                        while (s >= low) {
+                        while (s != -1 && s >= low) {
                             prev = enc.prevCharHead(bytes, str, s, end);
                             if (matchCheck(origStart, s, prev)) return match(s);
                             s = prev;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list