Skip to content
Snippets Groups Projects
Commit c84e70b6 authored by Yorhel's avatar Yorhel
Browse files

Properly fixed crash on browsing dirs with a small window size

I was overseeing a stupid mistake in
  a7b7841a
Obviously, you need to check against wincols and not winrows...
parent cc15863f
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ void browse_draw_item(struct dir *n, int row) { ...@@ -141,7 +141,7 @@ void browse_draw_item(struct dir *n, int row) {
} }
/* format and add item to the list */ /* format and add item to the list */
line = malloc(winrows > 35 ? winrows+1 : 36); line = malloc(wincols > 35 ? wincols+1 : 36);
switch(graph) { switch(graph) {
case 0: case 0:
sprintf(line, "%%c %%8s %%c%%-%ds", wincols-13); sprintf(line, "%%c %%8s %%c%%-%ds", wincols-13);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment