4411: Fix initialization of CUIEx::m_MouseSlow r=def- a=Robyt3
The `CUIEx` constructor with arguments is unused and only the default constructor was used but hidden away in the header file therefore missing the initialization.
Closes#4408.
## 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)
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
4404: test/serverbrowser: delete pConsole r=heinrich5991 a=def-
==235823==ERROR: LeakSanitizer: detected memory leaks
Indirect leak of 65632 byte(s) in 1 object(s) allocated from:
#0 0x563636cc2fc9 in malloc (/media/ddnet/testrunner+0x37afc9)
#1 0x563636e0fd89 in CHeap::NewChunk() /media/ddnet/src/engine/shared/memheap.cpp:14:17
#2 0x563636e10aee in CHeap::Reset() /media/ddnet/src/engine/shared/memheap.cpp:63:2
#3 0x563636d954a5 in CConsole::CExecutionQueue::Reset() /media/ddnet/src/engine/shared/console.h:188:12
#4 0x563636d4a272 in CConsole::CConsole(int) /media/ddnet/src/engine/shared/console.cpp:937:19
#5 0x563636d88a98 in CreateConsole(int) /media/ddnet/src/engine/shared/console.cpp:1230:59
#6 0x563636fbe915 in ServerBrowser_PingCache_Test::TestBody() /media/ddnet/src/test/serverbrowser.cpp:13:23
#7 0x7f0a2f87fe26 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/usr/lib/libgtest.so.1.11.0+0x54e26)
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: def <dennis@felsin9.de>
4403: Remove redundant *count >= max_count check r=def- a=Robyt3
`count` and `max_count` don't change after the check in the while loop.
## Checklist
- [ ] 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)
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
4402: Fix stack-buffer-overflow in Whisper (fixes#4400) r=heinrich5991 a=def-
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: def <dennis@felsin9.de>
4401: Disable connection reuse in curl (fixes#4342) r=heinrich5991 a=def-
Thanks to `@godwhoa` for report and testing the workaround!
I can't test this since I can't reproduce, but `@godwhoa` wrote:
> With connection reuse: 5/10 runs resulted in a crash.
> Without connection reuse: 0/10 runs resulted in a crash.
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: def <dennis@felsin9.de>
4391: Remove ping filter (fixes#4365) r=edg-l a=def-
We had lots of cases of people having ping filter activated. Ping is now
too unreliable to actually filter by it. It can show an old super high
value and then you never see the location again.
![screenshot-20211124@160502](https://user-images.githubusercontent.com/2335377/143262874-0cb93dba-9539-4d0d-8400-399dffd3509b.png)
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] 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: def <dennis@felsin9.de>
4389: Sanitize owner data in client (fixes#4388) r=edg-l a=def-
and don't access out of scope on owner < 0
<!-- What is the motivation for the changes of this pull request -->
## 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
- [x] 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: def <dennis@felsin9.de>
4396: /swap fix: swap started/finished information r=edg-l a=def-
Thanks to 冷落 for report
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] 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: def <dennis@felsin9.de>
4395: Update str_utf8_stats documentation, minor refactoring r=heinrich5991 a=Robyt3
This removes the check for the null-terminator from the while loop, as this is also checked in `str_utf8_forward`, which returns an unchanged size in this case. The comparison `new_size != *size` was previously redundant for that reason.
Update comments and add some empty lines for consistency.
`@heinrich5991`
## 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)
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
4393: Various text input refactorings r=def- a=Robyt3
Various refactorings and cherry-picks to `CLineInput` from the upstream PR. No issues fixed except for `CLineInput::Add` (now named `Append`) not updating `m_NumChars` before.
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [X] 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)
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
We had lots of cases of people having ping filter activated. Ping is now
too unreliable to actually filter by it. It can show an old super high
value and then you never see the location again.
4381: Fix enter behavior when creating new folder in editor r=edg-l a=def-
As reported by louis:
> pressing enter while creating a new folder in the editor (while using
> "save as") does not create the folder but instead enters the selected
> folder in the background
<!-- What is the motivation for the changes of this pull request -->
## 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)
4382: Fix save typing when server settings are open in editor r=edg-l a=def-
As reported by louis:
> while saving a mapname while having the "Server Settings" tab open,
> pressing "m" while typing the mapname will unfocus the cursor from the
> mapname field onto the server settings field
<!-- What is the motivation for the changes of this pull request -->
## 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)
4387: Don't access switchers out of bounds (fixes#4386) r=edg-l a=def-
It's possible that a map was saved with a different amount of switchers
than it has at the moment. Happened on Jao Shooter. I'll check with
mapper if they changed the number of switchers.
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: def <dennis@felsin9.de>
It's possible that a map was saved with a different amount of switchers
than it has at the moment. Happened on Jao Shooter. I'll check with
mapper if they changed the number of switchers.
4385: full translate catalan r=def- a=edg-l
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: Edgar <git@edgarluque.com>
4364: Update Chinese translations (by cheeser0613) r=def- a=def-
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
4367: Update hungarian (by Cellegen) r=def- a=def-
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: def <dennis@felsin9.de>
As reported by louis:
> while saving a mapname while having the "Server Settings" tab open,
> pressing "m" while typing the mapname will unfocus the cursor from the
> mapname field onto the server settings field
As reported by louis:
> pressing enter while creating a new folder in the editor (while using
> "save as") does not create the folder but instead enters the selected
> folder in the background
4377: Fix incorrect/inconsistent buffer sizes, improve fs_is_dir, cleanup r=def- a=Robyt3
- Fix buffers sizes when using `MultiByteToWideChar` and `WideCharToMultiByte`.
- input length is now always `-1`, as this will assume null-termination and also ensure it for the output
- output length is the number of array elements (and not the size in bytes as previously specified in some cases)
- Use `str_format` in `fs_storage_path` instead of platform specific functions for better maintainability.
- Implement `fs_is_dir` smarter by using `GetFileAttributesW` on Windows.
- Remove unused `fs_getmtime` that does not work with unicode on Windows in favor of the existing more generalized `fs_file_time`.
## 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)
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
4375: Fix unicode winsock error messages r=def- a=Robyt3
I'll also fix all usages of WideCharToMultiByte and MultiByteToWideChar next, because the wrong buffer size is specified.
## 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)
Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
4376: Update french.txt | DDNET: Sucre r=def- a=Sehyn
Are you sure that you want to disconnect and switch to a different server?
== Êtes vous sur de vouloir vous déconnecter et changer de serveur?
Refreshing...
== Actualisation...
Show local player's key presses
== Montrer les touches appuyées des autres joueurs
updated.
<!-- What is the motivation for the changes of this pull request -->
## Checklist
- [ ] 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)
Co-authored-by: Arthur.B <48888351+Sehyn@users.noreply.github.com>
Are you sure that you want to disconnect and switch to a different server?
== Êtes vous sur de vouloir vous déconnecter et changer de serveur?
Refreshing...
== Actualisation...
Show local player's key presses
== Montrer les touches appuyées des autres joueurs
updated.