Skip to content

Commit

Permalink
Merge pull request ddnet#6972 from Robyt3/Client-Vote-Option-Crash-Fix
Browse files Browse the repository at this point in the history
Fix client crash with more than `MAX_VOTE_OPTIONS` vote options
  • Loading branch information
def- authored Aug 6, 2023
2 parents 95cb517 + 2ea8273 commit 42e1674
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game/client/components/voting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ CVoting::CVoting()

void CVoting::AddOption(const char *pDescription)
{
if(m_NumVoteOptions == MAX_VOTE_OPTIONS)
return;

CVoteOptionClient *pOption;
if(m_pRecycleFirst)
{
Expand Down

0 comments on commit 42e1674

Please sign in to comment.