diff --git a/src/org/joni/StackMachine.java b/src/org/joni/StackMachine.java index 8a80781b..2975096c 100644 --- a/src/org/joni/StackMachine.java +++ b/src/org/joni/StackMachine.java @@ -502,7 +502,7 @@ protected final int nullCheckMemSt(int id, int s) { int endp; isNull = 1; while (k < stk) { - e = stack[k++]; + e = stack[k++]; if (e.type == MEM_START) { if (e.getMemEnd() == INVALID_INDEX) { isNull = 0; diff --git a/test/org/joni/test/TestA.java b/test/org/joni/test/TestA.java index d9403da3..bd95f3e0 100644 --- a/test/org/joni/test/TestA.java +++ b/test/org/joni/test/TestA.java @@ -500,6 +500,8 @@ public void test() throws InterruptedException { x2s("(?<=\\babc)d", " abcd", 4, 5); x2s("(?<=\\Babc)d", "aabcd", 4, 5); + x2s("([^\\s]+),(.*)+", " xxxx, xxx xxxxxx xxxxxxxxx xxxxxxx, xxxx xxxxx xxxxx ", 1, 62); + x2s(",(.*)+", " xxxx, xxx xxxxxx xxxxxxxxx xxxxxxx, xxxx xxxxx xxxxx ", 5, 52); } public static void main(String[] args) throws Throwable{