projects
/
vrfileman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daf685f
)
fixed crash if directory has no files
author
John Tsiombikas
<nuclear@mutantstargoat.com>
Mon, 22 Aug 2016 11:36:10 +0000
(14:36 +0300)
committer
John Tsiombikas
<nuclear@mutantstargoat.com>
Mon, 22 Aug 2016 11:36:10 +0000
(14:36 +0300)
src/fs.cc
patch
|
blob
|
history
diff --git
a/src/fs.cc
b/src/fs.cc
index
c7df966
..
8aec1b0
100644
(file)
--- a/
src/fs.cc
+++ b/
src/fs.cc
@@
-122,7
+122,7
@@
void draw_fs()
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
int nchildren = (int)cur_node->children.size();
- int ncols = std::min(cur_node->nfiles, max_ncols);
+ int ncols = std::max(std::min(cur_node->nfiles, max_ncols), 1);
int first = start_child % ncols;
int col = 0, row = 0;