Cleanup command parsing logic
This commit is contained in:
parent
1efcc61006
commit
0fb530e1a2
9
bar.c
9
bar.c
|
@ -326,11 +326,10 @@ parse (char *text)
|
||||||
cmd_area_begin (screen, pos_x, align);
|
cmd_area_begin (screen, pos_x, align);
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if (p++)
|
cmd_start = ++p;
|
||||||
cmd_start = p;
|
while (*p != '\0' && *p != '\n' && *p != '\\')
|
||||||
while (p++ && *p != '\0' && *p != '\n' && *p != '\\')
|
p++;
|
||||||
;
|
continue;
|
||||||
continue;
|
|
||||||
case 'e':
|
case 'e':
|
||||||
cmd_area_end (screen, pos_x, align);
|
cmd_area_end (screen, pos_x, align);
|
||||||
size_t cmd_len = (size_t)(p - cmd_start) - 2;
|
size_t cmd_len = (size_t)(p - cmd_start) - 2;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user