mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-15 03:27:49 +01:00
dmnt: allow string termination to end a toggle (closes #1980)
This commit is contained in:
parent
e3ace4be15
commit
ff7a80e592
@ -1025,13 +1025,16 @@ namespace ams::dmnt::cheat::impl {
|
|||||||
/* Skip whitespace. */
|
/* Skip whitespace. */
|
||||||
while (std::isspace(static_cast<unsigned char>(s[i]))) {
|
while (std::isspace(static_cast<unsigned char>(s[i]))) {
|
||||||
i++;
|
i++;
|
||||||
|
if (i >= len) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse whether to toggle. */
|
/* Parse whether to toggle. */
|
||||||
j = i + 1;
|
j = i + 1;
|
||||||
while (!std::isspace(static_cast<unsigned char>(s[j]))) {
|
while (j < len && !std::isspace(static_cast<unsigned char>(s[j]))) {
|
||||||
j++;
|
j++;
|
||||||
if (j >= len || (j - i) >= sizeof(toggle)) {
|
if ((j - i) >= sizeof(toggle)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user