diff options
author | Yorhel <git@yorhel.nl> | 2010-04-27 12:41:01 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-04-27 12:41:01 +0200 |
commit | a7b7841ac084b21afd85c85c896fe89c441d4062 (patch) | |
tree | f532751500c103afa5bc57a99e80fb576428ee2c | |
parent | a35f998168fd0e7bf50e998a1447e3936dd934de (diff) |
Fixed crash on browsing dirs with a small window size
Fixes bug #2991787
-rw-r--r-- | src/browser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/browser.c b/src/browser.c index 84b42cb..70b6ee6 100644 --- a/src/browser.c +++ b/src/browser.c @@ -141,7 +141,7 @@ void browse_draw_item(struct dir *n, int row) { } /* format and add item to the list */ - line = malloc(winrows+1); + line = malloc(winrows > 35 ? winrows+1 : 36); switch(graph) { case 0: sprintf(line, "%%c %%8s %%c%%-%ds", wincols-13); |