1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-21 20:27:13 +01:00

Fix a bug in the String library introduced by the previous commit.

This commit is contained in:
Sandu Liviu Catalin 2016-09-15 03:50:14 +03:00
parent 3e8250d04b
commit b023eef797

View File

@ -886,7 +886,7 @@ static SQInteger SplitWhereCharImpl(HSQUIRRELVM vm, int(*fn)(int), bool neg)
if ((fn(*itr) == 0) == neg) if ((fn(*itr) == 0) == neg)
{ {
// Are there any characters before this match? // 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 // Push this chunk of string on the stack
sq_pushstring(vm, last, itr - last); sq_pushstring(vm, last, itr - last);