mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #5651
5651: Fix shift with negative exponent in `TeamMask` r=def- a=Robyt3 Closes #5650. ## Checklist - [X] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [X] Changed no physics that affect existing maps - [X] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Robert Müller <robytemueller@gmail.com>
This commit is contained in:
commit
05dae670f1
|
@ -478,11 +478,14 @@ bool CGameTeams::TeamFinished(int Team)
|
|||
|
||||
int64_t CGameTeams::TeamMask(int Team, int ExceptID, int Asker)
|
||||
{
|
||||
int64_t Mask = 0;
|
||||
|
||||
if(Team == TEAM_SUPER)
|
||||
{
|
||||
if(ExceptID == -1)
|
||||
return 0xffffffffffffffff;
|
||||
return 0xffffffffffffffff & ~(1 << ExceptID);
|
||||
}
|
||||
|
||||
int64_t Mask = 0;
|
||||
for(int i = 0; i < MAX_CLIENTS; ++i)
|
||||
{
|
||||
if(i == ExceptID)
|
||||
|
|
Loading…
Reference in a new issue