mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
c2c21298e2
Swap mathematical operations to avoid multiplication by `1000`. As `time_freq()` returns the nanoseconds in a second (1e9), first dividing this number by 1000 does not lose any precision. Also ensure that `IntendedTick` is in the valid range of ticks. ``` src/engine/server/server.cpp:1585:64: runtime error: signed integer overflow: 24185120014282423 * 1000 cannot be represented in type 'long int' 0 0x55c165f220aa in CServer::ProcessClientPacket(CNetChunk*) src/engine/server/server.cpp:1579 1 0x55c165f3a8d3 in CServer::PumpNetwork(bool) src/engine/server/server.cpp:2383 2 0x55c165f51166 in CServer::Run() src/engine/server/server.cpp:2821 3 0x55c165eb37d0 in main src/engine/server/main.cpp:191 4 0x7f99e4c3ad8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 5 0x7f99e4c3ae3f in __libc_start_main_impl ../csu/libc-start.c:392 6 0x55c165e7ab64 in _start (build-asan/DDNet-Server+0xd7ab64) ``` |
||
---|---|---|
.. | ||
client | ||
docs | ||
external | ||
gfx | ||
server | ||
shared | ||
antibot.h | ||
Cargo.toml | ||
client.h | ||
config.h | ||
console.h | ||
console.rs | ||
demo.h | ||
discord.h | ||
editor.h | ||
engine.h | ||
favorites.h | ||
friends.h | ||
ghost.h | ||
graphics.h | ||
input.h | ||
kernel.h | ||
keys.h | ||
lib.rs | ||
map.h | ||
message.h | ||
rust.h | ||
server.h | ||
serverbrowser.h | ||
sound.h | ||
sqlite.h | ||
steam.h | ||
storage.h | ||
textrender.h | ||
updater.h | ||
uuid.h | ||
warning.h |