From 4a115b4dcac49d9e30e8114497caeee629ea3f7e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 26 Feb 2024 13:59:18 +1000 Subject: [PATCH] Fix bug introduced to string_length Signed-off-by: Allan McRae --- src/pacman/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index 43854a02..8a94e8ca 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -459,7 +459,7 @@ static size_t string_length(const char *s) char* replaced = malloc(sizeof(char) * strlen(s)); size_t iter = 0; for(; *s; s++) { - if(*s == '\033' && *(s+1) == '[' && isdigit(s+2)) { + if(*s == '\033' && *(s+1) == '[' && isdigit(*(s+2))) { /* handle terminal colour escape sequences */ const char* t = s + 3;