Properly fixed crash on browsing dirs with a small window size

I was overseeing a stupid mistake in
  a7b7841ac0
Obviously, you need to check against wincols and not winrows...
This commit is contained in:
Yorhel 2010-04-27 13:27:57 +02:00
parent cc15863fcc
commit c84e70b627

View file

@ -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);