mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 04:11:18 +00:00
dmnt: allow string termination to end a toggle (closes #1980)
This commit is contained in:
parent
e3ace4be15
commit
ff7a80e592
1 changed files with 5 additions and 2 deletions
|
@ -1025,13 +1025,16 @@ namespace ams::dmnt::cheat::impl {
|
|||
/* Skip whitespace. */
|
||||
while (std::isspace(static_cast<unsigned char>(s[i]))) {
|
||||
i++;
|
||||
if (i >= len) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse whether to toggle. */
|
||||
j = i + 1;
|
||||
while (!std::isspace(static_cast<unsigned char>(s[j]))) {
|
||||
while (j < len && !std::isspace(static_cast<unsigned char>(s[j]))) {
|
||||
j++;
|
||||
if (j >= len || (j - i) >= sizeof(toggle)) {
|
||||
if ((j - i) >= sizeof(toggle)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue