diff --git a/libr/parse/parse.c b/libr/parse/parse.c index 8f9c817545..be26176761 100644 --- a/libr/parse/parse.c +++ b/libr/parse/parse.c @@ -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; }