Fix game report OS version on Windows & Android #30841
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Bugfixes "Fix game report OS version on Windows & Android"
Purpose of change
Follow up for PR #30729 (added precise system versions in the game report).
Move the "bitness" report next to the game version, as it seems to have confused some players.
Fix a null byte problem on Windows (and possibly Android).
Given this
BYTE
(unsigned char) buffer:And its conversion to string:
It is possible that, if the byte buffer contains non-null characters after null characters, the null characters are still embedded in the string.
e.g. given a byte buffer with
foo\0\0\0ABC\0
you still get the null characters in the output string. I didn't see this behavior during my previous tests but it happened today while I was trying to unstack another bug.Describe the solution
Use:
std::string( reinterpret_cast<char *>( byte_buffer.data() )
Rather than:
std::string( byte_buffer.begin(), byte_buffer.end() )
Describe alternatives you've considered
N/A.
Additional context
Test results: