aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/osc.c b/osc.c
index d28fd057..42f775b4 100644
--- a/osc.c
+++ b/osc.c
@@ -431,6 +431,9 @@ osc_dispatch(struct terminal *term)
/* Set color<idx> */
string--;
+ if (*string != ';')
+ break;
+
assert(*string == ';');
for (const char *s_idx = strtok(string, ";"), *s_color = strtok(NULL, ";");