diff --git a/src/client/cl_screen.c b/src/client/cl_screen.c index ac2ff741..81cc9efe 100644 --- a/src/client/cl_screen.c +++ b/src/client/cl_screen.c @@ -1131,7 +1131,7 @@ SCR_ExecuteLayoutString(char *s) token = COM_Parse(&s); index = (int)strtol(token, (char **)NULL, 10); - if ((index < 0) || (index >= sizeof(cl.frame.playerstate.stats))) + if ((index < 0) || (index >= MAX_STATS)) { Com_Error(ERR_DROP, "bad stats index %d (0x%x)", index, index); } @@ -1358,7 +1358,7 @@ SCR_ExecuteLayoutString(char *s) token = COM_Parse(&s); index = (int)strtol(token, (char **)NULL, 10); - if ((index < 0) || (index >= MAX_CONFIGSTRINGS)) + if ((index < 0) || (index >= MAX_STATS)) { Com_Error(ERR_DROP, "Bad stat_string index"); }