Fix bug introduced to string_length
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
74deada511
commit
4a115b4dca
1 changed files with 1 additions and 1 deletions
|
@ -459,7 +459,7 @@ static size_t string_length(const char *s)
|
||||||
char* replaced = malloc(sizeof(char) * strlen(s));
|
char* replaced = malloc(sizeof(char) * strlen(s));
|
||||||
size_t iter = 0;
|
size_t iter = 0;
|
||||||
for(; *s; s++) {
|
for(; *s; s++) {
|
||||||
if(*s == '\033' && *(s+1) == '[' && isdigit(s+2)) {
|
if(*s == '\033' && *(s+1) == '[' && isdigit(*(s+2))) {
|
||||||
/* handle terminal colour escape sequences */
|
/* handle terminal colour escape sequences */
|
||||||
const char* t = s + 3;
|
const char* t = s + 3;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue