[jruby-joni] 82/223: Beyond string check goes first.

Hideki Yamane henrich at moszumanska.debian.org
Mon Nov 16 11:21:52 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 dca85e8021da631c27fbb888691253e081896a86
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Thu Feb 16 19:28:14 2012 +0100

    Beyond string check goes first.
---
 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 7591848..aff2bff 100644
--- a/src/org/joni/ByteCodeMachine.java
+++ b/src/org/joni/ByteCodeMachine.java
@@ -1462,14 +1462,14 @@ class ByteCodeMachine extends StackMachine {
 
     private void opPushOrJumpExact1() {
         int addr = code[ip++];
-        if (code[ip] == bytes[s] && s < range) {
+        // beyond string check
+        if (s < range && code[ip] == bytes[s]) {
             ip++;
             pushAlt(ip + addr, s, sprev);
             return;
         }
         ip += addr + 1;
     }
-
     private void opPushIfPeekNext() {
         int addr = code[ip++];
         // beyond string check

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