summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-04-27 13:27:57 +0200
committerYorhel <git@yorhel.nl>2010-04-27 13:27:57 +0200
commitc84e70b627baca50a93cdf49f085392f10cff9c4 (patch)
tree54212bdea0ebe2f99338b1d5b3f347322f9122b5
parentcc15863fcc347c71df1be401f11bfd06e2802884 (diff)
Properly fixed crash on browsing dirs with a small window size
I was overseeing a stupid mistake in a7b7841ac084b21afd85c85c896fe89c441d4062 Obviously, you need to check against wincols and not winrows...
-rw-r--r--src/browser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/browser.c b/src/browser.c
index 70b6ee6..9e9ccf6 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 > 35 ? winrows+1 : 36);
+ line = malloc(wincols > 35 ? wincols+1 : 36);
switch(graph) {
case 0:
sprintf(line, "%%c %%8s %%c%%-%ds", wincols-13);