summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c2
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;