Skip to content

Conversation

@kungfulon
Copy link

@kungfulon kungfulon commented Jan 19, 2026

votemap command uses indexes in range [1, MAX_VOTE_MAPS] while the array index is 0-based.
This fix avoid array index overflow when vote id is MAX_VOTE_MAPS.
I checked the original binary and confirm this should be the same behavior with the original code.

@kungfulon kungfulon changed the title Fix CHalfLifeMultiplay::m_iMapVotes array access WIP: Fix CHalfLifeMultiplay::m_iMapVotes array access Jan 19, 2026
"votemap" command uses indexes in range [1, MAX_VOTE_MAPS] while the array index is 0-based.
This fix avoid array index overflow when vote id is MAX_VOTE_MAPS.
@kungfulon kungfulon changed the title WIP: Fix CHalfLifeMultiplay::m_iMapVotes array access Fix CHalfLifeMultiplay::m_iMapVotes array access Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant