mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-11-30 13:07:19 +01:00
Fix a bug in the String library introduced by the previous commit.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user