Merge pull request #8294 from Robyt3/Server-Voteoption-Alignment

Fix alignment of vote option heap entries with `remove_vote`
This commit is contained in:
Dennis Felsing 2024-05-03 16:44:30 +00:00 committed by GitHub
commit cce5514c08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3277,7 +3277,7 @@ void CGameContext::ConRemoveVote(IConsole::IResult *pResult, void *pUserData)
// copy option // copy option
int Len = str_length(pSrc->m_aCommand); int Len = str_length(pSrc->m_aCommand);
CVoteOptionServer *pDst = (CVoteOptionServer *)pVoteOptionHeap->Allocate(sizeof(CVoteOptionServer) + Len); CVoteOptionServer *pDst = (CVoteOptionServer *)pVoteOptionHeap->Allocate(sizeof(CVoteOptionServer) + Len, alignof(CVoteOptionServer));
pDst->m_pNext = 0; pDst->m_pNext = 0;
pDst->m_pPrev = pVoteOptionLast; pDst->m_pPrev = pVoteOptionLast;
if(pDst->m_pPrev) if(pDst->m_pPrev)