lib/colors: keep static analyzer happy [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-05-14 16:37:35 +02:00
parent 0ed52c662e
commit dcf6f5b3d9
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}