Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarofe committed Jun 17, 2015
1 parent e147a21 commit 19ed923
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libr/util/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ static char *r_str_escape_ (const char *buf, const int dot_nl) {
p++;
/* Parse the ANSI code (only the graphic mode
* set ones are supported) */
if (*p == '\0') break;
if (*p == '\0') goto out;
if (*p == '[')
for (p++; *p != 'm'; p++)
;
Expand All @@ -940,6 +940,7 @@ static char *r_str_escape_ (const char *buf, const int dot_nl) {
p++;
}

out:
*q = '\0';

return new_buf;
Expand Down

0 comments on commit 19ed923

Please sign in to comment.