summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index ae2f5c1d..d2d76b20 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -3613,7 +3613,7 @@ void BG_ParseCSVClassList( const char *string, class_t *classes, int classesSize
p = q = buffer;
- while( *p != '\0' )
+ while( *p != '\0' && i < classesSize - 1 )
{
//skip to first , or EOS
while( *p != ',' && *p != '\0' )
@@ -3663,7 +3663,7 @@ void BG_ParseCSVBuildableList( const char *string, buildable_t *buildables, int
p = q = buffer;
- while( *p != '\0' )
+ while( *p != '\0' && i < buildablesSize - 1 )
{
//skip to first , or EOS
while( *p != ',' && *p != '\0' )