From b023eef7974ce8ea8916cdbd1457a7bafb1d8d81 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Thu, 15 Sep 2016 03:50:14 +0300 Subject: [PATCH] Fix a bug in the String library introduced by the previous commit. --- source/Library/String.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Library/String.cpp b/source/Library/String.cpp index 9626ba37..fe40f5ec 100644 --- a/source/Library/String.cpp +++ b/source/Library/String.cpp @@ -886,7 +886,7 @@ static SQInteger SplitWhereCharImpl(HSQUIRRELVM vm, int(*fn)(int), bool neg) if ((fn(*itr) == 0) == neg) { // Are there any characters before this match? - if ((itr - last) > 1 && (last != '\0')) + if ((itr - last) > 0 && (last != '\0')) { // Push this chunk of string on the stack sq_pushstring(vm, last, itr - last);