mirror of
https://github.com/ddnet/ddnet.git
synced 2024-10-20 07:48:18 +00:00
ChillerDragon
f8ca16c50e
The variable `Id` is translated for old clients and is not guranteed to be the real id. While `m_ClientID` is the real ID. That can also be used to index the CServer::m_aClients[] array to get the authed state. closed #7599 Fixes ``` valgrind ./DDNet-Server "dbg_dummies 1" [..] 2023-12-07 18:01:33 I chat: *** 'Debug dummy 1' entered and joined the game ==75634== Conditional jump or move depends on uninitialised value(s) ==75634== at 0x2DAA83: CVariableInt::Pack(unsigned char*, int, int) (compression.cpp:17) ==75634== by 0x2DAD79: CVariableInt::Compress(void const*, int, void*, int) (compression.cpp:98) ==75634== by 0x23EC50: CServer::DoSnapshot() (server.cpp:1046) ==75634== by 0x247D2D: CServer::Run() (server.cpp:2994) ==75634== by 0x230173: main (main.cpp:193) ==75634== ==75634== Conditional jump or move depends on uninitialised value(s) ==75634== at 0x2DAAF7: CVariableInt::Pack(unsigned char*, int, int) (compression.cpp:25) ==75634== by 0x2DAD79: CVariableInt::Compress(void const*, int, void*, int) (compression.cpp:98) ==75634== by 0x23EC50: CServer::DoSnapshot() (server.cpp:1046) ==75634== by 0x247D2D: CServer::Run() (server.cpp:2994) ==75634== by 0x230173: main (main.cpp:193) ==75634== ==75634== Conditional jump or move depends on uninitialised value(s) ==75634== at 0x2DAA83: CVariableInt::Pack(unsigned char*, int, int) (compression.cpp:17) ==75634== by 0x32E812: CPacker::AddInt(int) (packer.cpp:20) ==75634== by 0x23ED51: CServer::DoSnapshot() (server.cpp:1059) ==75634== by 0x247D2D: CServer::Run() (server.cpp:2994) ==75634== by 0x230173: main (main.cpp:193) ==75634== ==75634== Conditional jump or move depends on uninitialised value(s) ==75634== at 0x2DAAF7: CVariableInt::Pack(unsigned char*, int, int) (compression.cpp:25) ==75634== by 0x32E812: CPacker::AddInt(int) (packer.cpp:20) ==75634== by 0x23ED51: CServer::DoSnapshot() (server.cpp:1059) ==75634== by 0x247D2D: CServer::Run() (server.cpp:2994) ==75634== by 0x230173: main (main.cpp:193) ==75634== ``` Which is using ID 0 as index in the m_aClients array but only ID 63 was ever initialized. |
||
---|---|---|
.. | ||
entities | ||
gamemodes | ||
ddracechat.cpp | ||
ddracecommands.cpp | ||
entity.cpp | ||
entity.h | ||
eventhandler.cpp | ||
eventhandler.h | ||
gamecontext.cpp | ||
gamecontext.h | ||
gamecontroller.cpp | ||
gamecontroller.h | ||
gameworld.cpp | ||
gameworld.h | ||
player.cpp | ||
player.h | ||
save.cpp | ||
save.h | ||
score.cpp | ||
score.h | ||
scoreworker.cpp | ||
scoreworker.h | ||
teams.cpp | ||
teams.h | ||
teehistorian.cpp | ||
teehistorian.h | ||
teeinfo.cpp | ||
teeinfo.h |