pacman: check for end of string when stripping ascii escapes

This commit is contained in:
morganamilo 2024-02-03 15:00:56 +00:00 committed by Allan McRae
parent da4b590bce
commit 45ce932fd0

View file

@ -462,7 +462,7 @@ static size_t string_length(const char *s)
int iter = 0; int iter = 0;
for(; *s; s++) { for(; *s; s++) {
if(*s == '\033') { if(*s == '\033') {
while(*s != 'm') { while(*s != 'm' && *s != '\0') {
s++; s++;
} }
} else { } else {