-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Crash on Scrolling with Certain Watchlists #173
Labels
Comments
Reproduce data; |
cristian64
added a commit
to cristian64/dolphin-memory-engine
that referenced
this issue
Aug 18, 2024
As the documentation states, the caller must check that the input character in [`std::isprint()`](https://en.cppreference.com/w/cpp/string/byte/isprint) is a valid `unsigned char`: > Like all other functions from `<cctype>`, the behavior of > `std::isprint` is undefined if the argument's value is neither > representable as `unsigned char` nor equal to `EOF`. To use these > functions safely with plain `char`s (or `signed char`s), the argument > should first be converted to `unsigned char`: > > ```cpp > bool my_isprint(char ch) > { > return std::isprint(static_cast<unsigned char>(ch)); > } > ``` The aforementioned undefined behavior manifests as a debug assertion when compiled with MSVC: ![image](https://github.com/user-attachments/assets/144e3573-f53c-4e89-a0cd-d615caa2749e) The affected functionality was introduced in aldelaro5#122. Fixes aldelaro5#173.
cristian64
added a commit
to cristian64/dolphin-memory-engine
that referenced
this issue
Aug 18, 2024
As the documentation states, the caller must check that the input character in [`std::isprint()`](https://en.cppreference.com/w/cpp/string/byte/isprint) is a valid `unsigned char`: > Like all other functions from `<cctype>`, the behavior of > `std::isprint` is undefined if the argument's value is neither > representable as `unsigned char` nor equal to `EOF`. To use these > functions safely with plain `char`s (or `signed char`s), the argument > should first be converted to `unsigned char`: > > ```cpp > bool my_isprint(char ch) > { > return std::isprint(static_cast<unsigned char>(ch)); > } > ``` The aforementioned undefined behavior manifests as a debug assertion when compiled with MSVC: ![image](https://github.com/user-attachments/assets/144e3573-f53c-4e89-a0cd-d615caa2749e) The affected functionality was introduced in aldelaro5#122. Fixes aldelaro5#173.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if (std::isprint(c))
in
MemoryCommon.cpp
The text was updated successfully, but these errors were encountered: