fix next_char

This commit is contained in:
Fritz Grimpen 2025-02-06 22:32:09 +01:00
parent 27bfbe6ef4
commit 6c163d8eb0

View file

@ -73,14 +73,12 @@ char *next_char(char *needle)
int db;
if (*needle && *needle != '[')
return needle + 1;
for (db = (*needle == '[' ? 2 : 0);
for (db = 1;
*needle && (*needle != ']' || db);
needle++)
{
if (db > 1)
if (db)
db--;
}
return needle;
return needle + 1;
}
// Find first character behind the closing parenthesis of the current group, or end of string