termptyesc: _csi_arg_get() now correctly handles missing arguments
Only affects when multiple ones were expected
This commit is contained in:
parent
dbc75a0cc0
commit
e0f6867a88
|
@ -96,9 +96,17 @@ _csi_arg_get(Eina_Unicode **ptr)
|
|||
if (!b)
|
||||
goto error;
|
||||
|
||||
while ((*b) && (*b < '0' || *b > '9'))
|
||||
/* Skip potential '?', '>'.... */
|
||||
while ((*b) && ( (*b) != ';' && ((*b) < '0' || (*b) > '9')))
|
||||
b++;
|
||||
|
||||
if (*b == ';')
|
||||
{
|
||||
b++;
|
||||
*ptr = b;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!*b)
|
||||
goto error;
|
||||
|
||||
|
@ -111,6 +119,11 @@ _csi_arg_get(Eina_Unicode **ptr)
|
|||
b++;
|
||||
}
|
||||
|
||||
if (*b == ';')
|
||||
{
|
||||
b++;
|
||||
}
|
||||
|
||||
*ptr = b;
|
||||
return sum;
|
||||
|
||||
|
|
Loading…
Reference in New Issue