X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Ffs.cc;fp=src%2Ffs.cc;h=8aec1b0409624eeab6996fbea59ba10e6cee83b8;hp=c7df966e18a5dd6fc6d5f6ebe6c84565549f60e4;hb=c4c8a37741c6b59dc512cfaacca6fd593dab96fe;hpb=daf685f6e785a7b6cae559d879fa2e8bb66f63d3 diff --git a/src/fs.cc b/src/fs.cc index c7df966..8aec1b0 100644 --- 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;