[jruby-joni] 16/223: Fix debug output for some look behind operations.

Hideki Yamane henrich at moszumanska.debian.org
Mon Nov 16 11:21:40 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 65331fccf2f5fbe07f1ec3369934bd014537f8ee
Author: Marcin Mielżyński <lopx at gazeta.pl>
Date:   Fri Feb 15 21:02:25 2008 +0000

    Fix debug output for some look behind operations.
    
    git-svn-id: http://svn.codehaus.org/jruby/joni/trunk@5941 961051c9-f516-0410-bf72-c9f7e237a7b7
---
 src/org/joni/ByteCodeMachine.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/org/joni/ByteCodeMachine.java b/src/org/joni/ByteCodeMachine.java
index 549a280..e835e03 100644
--- a/src/org/joni/ByteCodeMachine.java
+++ b/src/org/joni/ByteCodeMachine.java
@@ -190,9 +190,9 @@ class ByteCodeMachine extends StackMachine {
         if (Config.DEBUG_MATCH) {
             Config.log.printf("%4d", (s - str)).print("> \"");
             int q, i;
-            for (i=0, q=s; i<7 && q<end; i++) {
+            for (i=0, q=s; i<7 && q<end && s>=0; i++) {
                 int len = enc.length(bytes[q]);
-                while (len-- > 0) if (q < this.end) Config.log.print(new String(new byte[]{bytes[q++]}));
+                while (len-- > 0) if (q < end) Config.log.print(new String(new byte[]{bytes[q++]}));
             }
             String str = q < end ? "...\"" : "\"";
             q += str.length();

-- 
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