ddnet/src/engine
bors[bot] 482f15a711
Merge #5520 #5624
5520: Warn about pnglite-incompatible PNGs on load r=def- a=heinrich5991

This allows a larger range of PNGs to be loaded while still maintaining
backward compatibility with older clients by annoying the user.

This warning can be enabled by the `warn-pnglite-incompatible-images`
key in the https://info2.ddnet.tw/info JSON, if the key is not there or
the JSON hasn't been obtained yet, the warning is disabled. Since the
JSON is cached across restarts, it'll be effective for initially loaded
images from the second start.

## 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 if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


5624: Move message copy inside `SendPackMsgTranslate` r=def- a=Robyt3

Fix clang warning: Address of stack memory associated with local variable 'aBuf' is still referred to by the stack variable 'tmp' upon returning to the caller.  This will be a dangling reference [clang-analyzer-core.StackAddressEscape]

Mark the input parameters as const pointers and mark the protocol message `Pack` methods as const.

And remove a null check that only serves to hide programmer errors.

## 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
- [ ] Changed no physics that affect existing maps
- [ ] 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: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-07-14 16:38:08 +00:00
..
client Warn about pnglite-incompatible PNGs on load 2022-07-14 18:22:46 +02:00
docs Fix a woopsie in snapshot docs 2021-05-29 11:07:33 +02:00
external Change from pnglite to libpng for PNG reading 2022-06-21 13:37:14 +02:00
gfx Warn about pnglite-incompatible PNGs on load 2022-07-14 18:22:46 +02:00
server Remove null check that potentially hides programming errors 2022-07-11 19:11:32 +02:00
shared Merge #5511 2022-07-13 20:12:45 +00:00
antibot.h Forgot to add target here 2021-07-22 00:22:12 +02:00
client.h Allow multiple connect addresses 2022-07-10 16:57:10 +02:00
config.h Implement "reset" command 2021-12-27 01:13:11 +01:00
console.h Huge variable naming format 2022-07-08 18:01:29 +02:00
demo.h Added external linkage instead of static const 2022-04-03 01:12:27 +02:00
discord.h Put the Discord stuff into its own file 2021-01-31 10:17:21 +01:00
editor.h Separate editor update and render to fix slow joystick input 2022-06-15 17:37:22 +02:00
engine.h Mark virtual function as override using a script: 2022-05-17 23:47:32 +02:00
favorites.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
friends.h Run clang-format 2020-09-26 21:50:15 +02:00
ghost.h Organize engine-shared includes 2022-05-29 20:02:22 +02:00
graphics.h Warn about pnglite-incompatible PNGs on load 2022-07-14 18:22:46 +02:00
input.h Fix segfault in SDL_JoystickClose on client quit 2022-06-18 11:57:57 +02:00
kernel.h Huge variable naming format 2022-07-08 18:01:29 +02:00
keys.h Add joystick support to engine 2022-06-13 20:40:36 +02:00
map.h Huge variable naming format 2022-07-08 18:01:29 +02:00
message.h Run clang-format 2020-09-26 21:50:15 +02:00
server.h Move message copy inside SendPackMsgTranslate 2022-07-11 19:02:16 +02:00
serverbrowser.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
sound.h Add IsPlaying to engine sound 2022-06-26 22:43:30 +02:00
sqlite.h Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
steam.h Allow joining and inviting others via Steam friend list while ingame 2020-09-06 17:08:38 +02:00
storage.h Add IStorage::ReadFile and ReadFileStr: 2022-06-16 10:19:36 +02:00
textrender.h (A bit) safer interface for text containers 2022-07-08 19:19:37 +02:00
updater.h Overhauled job system 2017-11-23 15:47:38 +01:00
uuid.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
warning.h Add block list for drivers 2020-11-05 21:07:14 +01:00