Skip to content
Snippets Groups Projects
Commit 77682aab authored by lat9nq's avatar lat9nq
Browse files

mii_types: Remove null terminator check


This is an OoB array access, causing a crash on at least the Linux
Flatpak releases.

Co-authored-by: default avatargerman77 <juangerman-13@hotmail.com>
parent 2fe92436
No related branches found
No related tags found
No related merge requests found
......@@ -606,15 +606,12 @@ struct Nickname {
static constexpr std::size_t MaxNameSize = 10;
std::array<char16_t, MaxNameSize> data;
// Checks for null, non-zero terminated or dirty strings
// Checks for null or dirty strings
bool IsValid() const {
if (data[0] == 0) {
return false;
}
if (data[MaxNameSize] != 0) {
return false;
}
std::size_t index = 1;
while (data[index] != 0) {
index++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment