Commit graph

15746 commits

Author SHA1 Message Date
bors[bot] dce0d32a30
Merge #5978
5978: Tell the default value in README for flags r=def- a=rffontenelle

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2022-10-25 12:29:57 +00:00
Rafael Fontenelle 7eb1c656e8
Tell the default value in README for flags 2022-10-25 09:11:14 -03:00
bors[bot] cc9ef401db
Merge #5975
5975: Fix crash when cutting a demo opened from command line, various other demo menu fixes r=heinrich5991 a=Robyt3

Crash reported by `@teini94` on Discord.

## 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: Robert Müller <robytemueller@gmail.com>
2022-10-24 20:31:25 +00:00
Robert Müller 6ef3adaa23 Fix long demo names being truncated in popups and UI
Use `IO_MAX_PATH_LENGTH` for all demo filenames and paths, so long demo names and demo names containing many unicode characters are not so easily truncated in the cut, rename and render dialogs.

Use combination of `str_endswith` and `str_append` to append file extensions, instead of using `str_comp_nocase` and `str_format`. Thereby only support creating demos and video files with lower case file extension, as only demo files with lower case file extension are shown in the client anyway.
2022-10-24 20:42:52 +02:00
Robert Müller b486028838 Remove dead code
The `PopupMessage` was never shown, as the next line activates `POPUP_REPLACE_VIDEO` which immediates overrides the message popup.
2022-10-24 20:18:09 +02:00
Robert Müller 326a0a576d Fix slicing a demo opened with absolute path not working
Slicing a demo opened from command line with an absolute path did not work, as the game only tried to load the source demo from storage instead of using the given absolute path.
2022-10-24 20:15:49 +02:00
Robert Müller 997af452d0 Fix crash when cutting a demo opened from command line
When playing a demo without opening the demo menu first, i.e. from command line argument or with `play` command from the main menu, clicking the demo slice button crashes the game, as the code tries to use the filename of the currently selected demo while there is no demo selected, i.e. `m_DemolistSelectedIndex == -1`.
Also, when using the play command after opening the demo menu, the initial filename selected for cutting was incorrectly set to the currently selected demo.

This is fixed by getting the name of the current demo file from the demo player instead, when cutting a demo.
Though the cut demo will be saved to the last demo folder selected (or the demos directory) instead of being saved to the same directory as the original demo.
2022-10-24 20:14:04 +02:00
Robert Müller 3c1cd89ae6 Append file extension before checking for identical cut demo filename
The file extension needs to be appended to the cut demo name before checking whether the name matches the currently playing file, otherwise the "Please use a different name" error message is not shown and instead the "File already exists" question is shown.
2022-10-24 19:53:42 +02:00
Robert Müller be45604354 Fix demo file not being closed after showing error message
When entering the name of an existing demo file into the Slice demo dialog and pressing the Ok button twice, the file handle that's used for checking for the demo file's existence is not closed, hence the cut demo file cannot be deleted until the client is closed.
2022-10-24 19:48:44 +02:00
bors[bot] 2330a85abc
Merge #5972 #5973
5972: Update simplified_chinese.txt r=heinrich5991 a=Cheeser0613

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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)


5973: Update traditional_chinese.txt r=heinrich5991 a=Cheeser0613

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2022-10-23 20:38:58 +00:00
Cheeser0613 c7565ebaeb
Update traditional_chinese.txt 2022-10-24 02:26:42 +08:00
Cheeser0613 9d56aa36dd
Update simplified_chinese.txt 2022-10-24 02:25:55 +08:00
bors[bot] b4b9cb1c54
Merge #5971
5971: Use `fegetenv`/`fesetenv` instead of `_control87` on Windows r=heinrich5991 a=Robyt3

As `_control87` doesn't seem to be available for some MinGW compilers.

Closes #5969.

## 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: Robert Müller <robytemueller@gmail.com>
2022-10-23 12:49:29 +00:00
Robert Müller 5c11937543 Use fegetenv/fesetenv instead of _control87 on Windows
As `_control87` doesn't seem to be available for some MinGW compilers.

Closes #5969.
2022-10-23 10:59:53 +02:00
bors[bot] fdc35b48b9
Merge #5968
5968: Fix text input not working when entering editor with bind, fix IME not being deactivated when editor is closed r=heinrich5991 a=Robyt3

When entering the editor with a custom bind (e.g. `bind e "cl_editor 1"`) or when opening it from the console while also immediately closing the console (e.g. with `cl_editor 1; toggle_local_console`), the IME state was not properly set to active, so SDL did not report any `SDL_TEXTINPUT` events, leading to editboxes in the editor not receiving any text.

The is fixed by always enabling the IME state when entering the editor, which was previously only done when using the Ctrl+Shift+E hotkey or coincidentally when the editor is activated while the IME is already active, i.e. when the menu or console is open.

Closes #5095.

And fix another minor issue that became apparent due to added debug messages while debugging the previous issue:

Previously the IME was not deactivated when the editor is closed, so `SDL_TEXTINPUT` events where still being reported ingame after exiting the editor.

## 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: Robert Müller <robytemueller@gmail.com>
2022-10-21 19:50:09 +00:00
Robert Müller c0da3b93e4 Fix IME not being deactivated when editor is closed
Previously the IME was not deactivated when the editor is closed, so `SDL_TEXTINPUT` events where still being reported ingame after exiting the editor.
2022-10-21 21:31:21 +02:00
Robert Müller 75326e8393 Fix text input not working when entering editor with bind
When entering the editor with a custom bind (e.g. `bind e "cl_editor 1"`) or when opening it from the console while also immediately closing the console (e.g. with `cl_editor 1; toggle_local_console`), the IME state was not properly set to active, so SDL did not report any `SDL_TEXTINPUT` events, leading to editboxes in the editor not receiving any text.

The is fixed by always enabling the IME state when entering the editor, which was previously only done when using the Ctrl+Shift+E hotkey or coincidentally when the editor is activated while the IME is already active, i.e. when the menu or console is open.

Closes #5095.
2022-10-21 21:20:10 +02:00
bors[bot] 529bbcefe9
Merge #5967
5967: Fix crashes in editor when scrolling with up/down keys on empty sounds/images lists r=heinrich5991 a=Robyt3

The crashes were already present before #5751.

## 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: Robert Müller <robytemueller@gmail.com>
2022-10-21 18:47:13 +00:00
Robert Müller f5a16c1c77 Fix crash in editor when using up/down keys on empty images list 2022-10-21 20:28:30 +02:00
Robert Müller 4a683e024a Fix crash in editor when using up/down keys on empty sounds list 2022-10-21 20:28:00 +02:00
bors[bot] 8feba4ecf6
Merge #5966
5966: Fix duplicate description of cl_default_zoom_level r=heinrich5991 a=def-

Since #5894 is not landing

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: Dennis Felsing <dennis@felsin9.de>
2022-10-21 11:53:55 +00:00
bors[bot] 1c56ca4096
Merge #5964
5964: Ignore useless pylint options (fixes #5950) r=heinrich5991 a=def-

I think we should disable this warning for unknown warnings so that old pylint versions keep working ok

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: Dennis Felsing <dennis@felsin9.de>
2022-10-21 11:27:18 +00:00
bors[bot] 9c6a187ee9
Merge #5965
5965: Don't print max value when there is none (fixes #5953) r=edg-l a=def-

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: Dennis Felsing <dennis@felsin9.de>
2022-10-21 07:35:19 +00:00
Dennis Felsing eb27b26d8d Also ignore min value 2022-10-21 00:34:44 +02:00
Dennis Felsing f7bc58b056 Fix duplicate description of cl_default_zoom_level
Since #5894 is not landing
2022-10-21 00:12:07 +02:00
Dennis Felsing 26a08360f8 Don't print max value when there is none (fixes #5953) 2022-10-21 00:09:30 +02:00
Dennis Felsing 1020b0a26f Ignore useless pylint options (fixes #5950)
I think we should disable this warning for unknown warnings so that old
pylint versions keep working ok
2022-10-21 00:01:10 +02:00
bors[bot] 6aa5953159
Merge #5963
5963: Avoid using `atoi`, `atof` and `atol` functions, use `str_copy` instead of `snprintf` to copy strings r=def- a=Robyt3



## 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: Robert Müller <robytemueller@gmail.com>
2022-10-20 20:40:02 +00:00
Robert Müller 73fe4e6ed4 Use str_copy instead of snprintf to copy strings 2022-10-20 20:56:58 +02:00
Robert Müller c4cf26ea81 Replace atol usages with str_toint, as type is int anyway
As `atol` does not provide any way to detect errors and can cause undefined behavior on errors, i.e. when the result cannot be represented as a `long`.

The `atol` function was only used in `priv_net_extract` for parsing the port, which is an `int` and not a `long`, so the existing `str_toint` is used instead.

References:

- https://wiki.sei.cmu.edu/confluence/display/c/ERR07-C.+Prefer+functions+that+support+error+checking+over+equivalent+functions+that+don%27t
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/atol.html
2022-10-20 20:54:01 +02:00
Robert Müller 1469e88a79 Replace atof usages with strtod (str_tofloat wrapper)
As `atof` does not provide any way to detect errors and can cause undefined behavior on errors, i.e. when the result cannot be represented as a `float`.

References:

- https://wiki.sei.cmu.edu/confluence/display/c/ERR07-C.+Prefer+functions+that+support+error+checking+over+equivalent+functions+that+don%27t
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/atof.html
2022-10-20 20:30:12 +02:00
Robert Müller 6b043bf3b2 Replace atoi usages with strtol (str_toint wrapper)
As `atoi` does not provide any way to detect errors and can cause undefined behavior on errors, i.e. when the result cannot be represented as an `int`.

References:

- https://wiki.sei.cmu.edu/confluence/display/c/ERR07-C.+Prefer+functions+that+support+error+checking+over+equivalent+functions+that+don%27t
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/atoi.html
2022-10-20 20:30:11 +02:00
bors[bot] 040726ea71
Merge #5962
5962: Update Korean translations by CHaBek r=heinrich5991 a=cwh7435

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: CHaBek <44938972+cwh7435@users.noreply.github.com>
2022-10-20 14:10:55 +00:00
CHaBek 158b721bd4
Update Korean translations by CHaBek 2022-10-20 23:03:01 +09:00
bors[bot] 0de14cbe5c
Merge #5961
5961: Update russian.txt r=heinrich5991 a=lolipodass

added the missing translations

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (especially base/) or added coverage to integration test
- [x] Considered possible null pointers and out of bounds array indexing
- [x] 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)
![image](https://user-images.githubusercontent.com/56706038/196875775-12fd4f3d-78a9-42e7-8800-d2c2ac524e4c.png)
![image](https://user-images.githubusercontent.com/56706038/196875846-b45d0089-d3a1-4842-a287-bcaae8ca1dce.png)



Co-authored-by: lolipodass <56706038+lolipodass@users.noreply.github.com>
2022-10-20 10:01:32 +00:00
lolipodass 8a39ef71de
Update russian.txt
added the missing translations
2022-10-20 09:40:16 +03:00
bors[bot] e32710c7d1
Merge #5959
5959: Sort dependencies alphabetically in README.md r=def- a=heinrich5991

## 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 (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>
2022-10-19 23:04:44 +00:00
bors[bot] 53080e3e14
Merge #5938
5938: Hex Values in the editor's info feature r=heinrich5991 a=VoxelDoesCode

Add an option when the info button is selected, you can show the hexadecimal values for a tile rather than 1-255. This has some benefits, as it aligns in a perfect grid. Can help with making and test automappers.

![image](https://user-images.githubusercontent.com/95713843/195209286-82dd04d5-f469-4932-bbd7-93ec3fd32f99.png)

## Checklist

- [x] Tested the change ingame
- [x] 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
- [ ] 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: VoxelDoesCode <bluheadcat@gmail.com>
2022-10-19 22:47:35 +00:00
heinrich5991 38a07a2494 Sort dependencies alphabetically in README.md 2022-10-19 22:27:20 +02:00
bors[bot] f977a382f3
Merge #5958
5958: fix skin click ptr r=heinrich5991 a=Jupeyy

Just noticed that the menu button didnt work anymore, bcs we often use the pointer of the config vars or other variables for the pID ptr

and since i moved the m_aName up in the CSkin: pSkin(the ptr) and pSkin->GetName()(ptr to m_aName) returned the same ptr ( another UI element already use pSkin, our UI breaks bcs of that)

such a mess xDD
## 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: Jupeyy <jupjopjap@gmail.com>
2022-10-19 19:24:25 +00:00
Jupeyy b70fc39571 fix skin click ptr 2022-10-19 20:18:43 +02:00
bors[bot] 4050678526
Merge #5954
5954: Use CMake to configure static C stdlib on Windows r=def- a=heinrich5991

Previously warnings were generated because we were passing /MTd-like arguments twice, due to us and CMake 3.15+ adding these arguments: https://cmake.org/cmake/help/v3.25/policy/CMP0091.html.

This requires CMake 3.15 on Windows.

This fixes #5940.

## 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>
2022-10-18 20:15:21 +00:00
bors[bot] 401157dfde
Merge #5955
5955: Fix `parse_drmingw.sh` not finding module offset on Linux systems r=heinrich5991 a=Robyt3

The end anchor is removed from the grep RegEx, as it's not necessary and as it doesn't work on Linux systems when the crash log uses Windows line endings.

## 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 (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: Robert Müller <robytemueller@gmail.com>
2022-10-18 19:52:45 +00:00
Robert Müller ec5d5d0fb9 Fix parse_drmingw.sh not finding module offset on Linux systems
The end anchor is removed from the grep RegEx, as it's not necessary and as it doesn't work on Linux systems when the crash log uses Windows line endings.
2022-10-18 18:36:57 +02:00
heinrich5991 845c67afad Use CMake to configure static C stdlib on Windows
Previously warnings were generated because we were passing /MTd-like
arguments twice, due to us and CMake 3.15+ adding these arguments:
https://cmake.org/cmake/help/v3.25/policy/CMP0091.html.

This requires CMake 3.15 on Windows.

This fixes #5940.
2022-10-18 14:53:37 +02:00
bors[bot] e05e47b200
Merge #5951
5951: Fix compilation with VS2022 with exception handling enabled r=heinrich5991 a=Robyt3

By moving the calling convention `APIENTRY`, which expands to `__stdcall`, inside the parenthesis.

```
Severity	Code	Description	Project	File	Line	Suppression State
Error	C2143	syntax error: missing ')' before '('	engine-shared	src\base\system.cpp	4242
Warning	C4229	anachronism used: modifiers on data are ignored	engine-shared	src\base\system.cpp	4242
Error	C2059	syntax error: ')'	engine-shared	src\base\system.cpp	4242
Error	C2059	syntax error: ')'	engine-shared	src\base\system.cpp	4242
Error	C3536	'exception_log_file_path_func': cannot be used before it is initialized	engine-shared	src\base\system.cpp	4246
Error	C2446	'==': no conversion from 'nullptr' to 'int'	engine-shared	src\base\system.cpp	4246
Error	C2064	term does not evaluate to a function taking 1 arguments	engine-shared	src\base\system.cpp	4249
```

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your 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 (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: Robert Müller <robytemueller@gmail.com>
2022-10-16 16:45:19 +00:00
Robert Müller 25e6eed0e8 Fix compilation with VS2022 with exception handling enabled
By moving the calling convention `APIENTRY`, which expands to `__stdcall`, inside the parenthesis.

```
Severity	Code	Description	Project	File	Line	Suppression State
Error	C2143	syntax error: missing ')' before '('	engine-shared	src\base\system.cpp	4242
Warning	C4229	anachronism used: modifiers on data are ignored	engine-shared	src\base\system.cpp	4242
Error	C2059	syntax error: ')'	engine-shared	src\base\system.cpp	4242
Error	C2059	syntax error: ')'	engine-shared	src\base\system.cpp	4242
Error	C3536	'exception_log_file_path_func': cannot be used before it is initialized	engine-shared	src\base\system.cpp	4246
Error	C2446	'==': no conversion from 'nullptr' to 'int'	engine-shared	src\base\system.cpp	4246
Error	C2064	term does not evaluate to a function taking 1 arguments	engine-shared	src\base\system.cpp	4249
```
2022-10-16 18:16:58 +02:00
bors[bot] 24207b741c
Merge #5947
5947: Fix client crash when server does not send gameinfo r=def- a=Robyt3

As reported by `@ChillerDragon` on Discord.

## 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
- [X] Considered possible null pointers and out of bounds array indexing
- [X] 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 <robytemueller@gmail.com>
2022-10-15 19:20:25 +00:00
bors[bot] 93b99efa8b
Merge #5946
5946: Add tests for too small/large `sha256_str` and `md5_str` buffers, minor refactoring r=def- a=Robyt3



## Checklist

- [ ] 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 (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: Robert Müller <robytemueller@gmail.com>
2022-10-15 18:58:19 +00:00
Robert Müller c78f71b2b9 Fix client crash when server does not send gameinfo 2022-10-15 19:43:26 +02:00