diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-30 02:06:38 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:14 +0000 |
commit | 50c86fa4c3376d7d3b635dda54a1037f3cddd170 (patch) | |
tree | 0acce230422c897230e984a9409b90ee0865cf4f /src | |
parent | e53d789f7eca53631fd286f0f2f122fd7e3163e9 (diff) |
* Fix for listmaps command misbehaving when searching for something that returns zero results (Rezyn)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 4fcaf1b7..2d4a2344 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2858,7 +2858,7 @@ void Cmd_ListMaps_f( gentity_t *ent ) qsort( fileSort, count, sizeof( fileSort[ 0 ] ), SortMaps ); rows = ( count + 2 ) / 3; - pages = ( rows + MAX_MAPLIST_ROWS - 1 ) / MAX_MAPLIST_ROWS; + pages = MAX( 1, ( rows + MAX_MAPLIST_ROWS - 1 ) / MAX_MAPLIST_ROWS ); if( page >= pages ) page = pages - 1; |