mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 13:49:50 +00:00
Fix an overflow and another glitch in ascii graphs
This commit is contained in:
parent
3fc1e58bc3
commit
85277d7f0c
@ -98,13 +98,17 @@ R_API void r_cons_canvas_write(RConsCanvas *c, const char *_s) {
|
||||
char *line, *n;
|
||||
|
||||
str = s = strdup (_s);
|
||||
for (i=0;;i++) {
|
||||
for (i=0; ; i++) {
|
||||
line = getrow (s, &n);
|
||||
p = prefixline (c, &left);
|
||||
slen = R_MIN (left, strlen (line));
|
||||
if (slen<1)
|
||||
break;
|
||||
if (!G (c->x-c->sx+slen, c->y-c->sy)) {
|
||||
// TODO : chop slen
|
||||
slen = (c->w - (c->x-c->sx));
|
||||
if (slen<1)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
if (!G (c->x-c->sx-slen, c->y-c->sy))
|
||||
|
Loading…
Reference in New Issue
Block a user