diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/colors.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/colors.c b/lib/colors.c index bea7bd1d7..29f5c8569 100644 --- a/lib/colors.c +++ b/lib/colors.c @@ -424,8 +424,10 @@ static int cn_sequence(const char *str, char **seq) in++; } - assert ((out - *seq) <= len); - *out = '\0'; + if (out) { + assert ((out - *seq) <= len); + *out = '\0'; + } return 0; } |