Bring back an ugly buffer pack access issue to make it work

This commit is contained in:
pancake 2018-03-14 19:56:49 +01:00
parent 564aaf6e48
commit c2c8257c06

View File

@ -314,7 +314,14 @@ static int filter(RParse *p, RFlag *f, char *data, char *str, int len, bool big_
break;
}
memmove (ptr_left, ptr_esc, copied_len);
#if 1
sprintf (ptr_left + copied_len, "%s%s",
ansi_found && ptr_right - ptr_end + 1 >= 4 ? "\x1b[0m" : "",
ptr_right + 1);
#else
strcpy (ptr_left + copied_len, ptr_right + 1);
#endif
}
break;
}