Skip to content

Commit 6c8eb0e

Browse files
authored
Merge pull request #26 from Caball009/Caball009-patch-1
fix(gamestate): relax max config string checks
2 parents 458768e + 0631cab commit 6c8eb0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cl_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8148,7 +8148,7 @@ void CL_ParseGamestateLegacy( msg_t *msg ) {
81488148
Com_Error( ERR_DROP, "CL_ParseGamestate(): No configstrings" );
81498149
}
81508150

8151-
if ( numcs < 0 || numcs >= MAX_CONFIGSTRINGS ) {
8151+
if ( numcs < 0 || numcs > MAX_CONFIGSTRINGS ) {
81528152
Com_Error( ERR_DROP, "configstring > MAX_CONFIGSTRINGS" );
81538153
}
81548154

@@ -8326,8 +8326,8 @@ void CL_ParseGamestateX( msg_t *msg ) {
83268326
Com_Error( ERR_DROP, "CL_ParseGamestate(): No configstrings" );
83278327
}
83288328

8329-
if ( numcs < 0 || numcs >= 2*MAX_CONFIGSTRINGS ) {
8330-
Com_Error( ERR_DROP, "configstringcount(%d) >= 2*MAX_CONFIGSTRINGS(%d)", numcs, MAX_CONFIGSTRINGS);
8329+
if ( numcs < 0 || numcs > 2*MAX_CONFIGSTRINGS ) {
8330+
Com_Error( ERR_DROP, "configstringcount(%d) > 2*MAX_CONFIGSTRINGS(%d)", numcs, MAX_CONFIGSTRINGS);
83318331
}
83328332

83338333
confIndex = -1;

0 commit comments

Comments
 (0)