Skip to content
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

Show extended scan preview for strings. #122

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

cristian64
Copy link
Collaborator

@cristian64 cristian64 commented Apr 28, 2024

Scan preview for strings will be unbounded; their length will be determined solely by the null character:

DME - Extended Preview Strings

Bonus: Non-printable characters in scanned or watched strings will be replaced with the � character (the unrepresentable character).

Fixes #79.

Scan preview for strings will be unbounded; their length will be
determined solely by the null character.

Bonus: Non-printable characters in scanned or watched strings will be
replaced with the � character (the unrepresentable character).

Fixes aldelaro5#79.
Copy link
Collaborator

@dreamsyntax dreamsyntax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this is super useful

@dreamsyntax dreamsyntax merged commit cd16d39 into aldelaro5:master Apr 28, 2024
4 checks passed
cristian64 added a commit to cristian64/dolphin-memory-engine that referenced this pull request 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 pull request 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.
dreamsyntax pushed a commit that referenced this pull request 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 #122.

Fixes #173.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Extended Scan Result Preview for Strings
2 participants