diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 34e8b20..3b1566c 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -3840,9 +3840,10 @@ g_admin_level_t *G_admin_find_level_for_score( int score ) { for( level = g_admin_levels; level; level = next ) { next = level->next; - if( next == NULL && level->score > 0) return level; - if( next->score < 0 ) continue; - if( /*level->score > score && */next->score <= score ) return next; + if( next != NULL) { + if( next->score < 0 ) continue; + if( /*level->score > score && */next->score <= score ) return next; + } else if (level->score > 0) return level; } return NULL; } |