aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tty-term.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tty-term.c b/tty-term.c
index 7e0fdb37..b43fe06e 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -312,10 +312,13 @@ tty_term_override_next(const char *s, size_t *offset)
if (s[at] == '\0')
return (NULL);
- while (s[at] != '\0' && s[at] != ':') {
- if (s[at] == '\\' && s[at + 1] == ':') {
- value[n++] = ':';
- at += 2;
+ while (s[at] != '\0') {
+ if (s[at] == ':') {
+ if (s[at + 1] == ':') {
+ value[n++] = ':';
+ at += 2;
+ } else
+ break;
} else {
value[n++] = s[at];
at++;