Skip to content

Commit

Permalink
Fix crash caused by ReloadMapCycleFile function (#576)
Browse files Browse the repository at this point in the history
* Fix crash caused by ReloadMapCycleFile function
  • Loading branch information
s1lentq authored Nov 13, 2020
2 parents a8802e6 + bbfc3fe commit 99954a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4418,7 +4418,12 @@ int ReloadMapCycleFile(char *filename, mapcycle_t *cycle)
if (Q_strlen(pToken) <= 0)
break;

#ifdef REGAMEDLL_FIXES
Q_strncpy(szMap, pToken, sizeof(szMap) - 1);
szMap[sizeof(szMap) - 1] = '\0';
#else
Q_strcpy(szMap, pToken);
#endif

// Any more tokens on this line?
if (SharedTokenWaiting(pFileList))
Expand Down

0 comments on commit 99954a2

Please sign in to comment.