mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-11 17:47:52 +00:00
[cheats] Check for comments in patch line loop (#156)
My test case is this file, after line 27 is not marked as patch because it's after `@` tag but rest is patch lines including comments. <2ac3ff239f/1.0.0.pchtxt (L31)
>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/156
Co-authored-by: notenergydrinks <notenergydrinks@eden-emu.dev>
Co-committed-by: notenergydrinks <notenergydrinks@eden-emu.dev>
This commit is contained in:
parent
b089e7d4e6
commit
c1d9cbca64
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@ -255,6 +255,11 @@ void IPSwitchCompiler::Parse() {
|
||||||
|
|
||||||
const auto& patch_line = lines[++i];
|
const auto& patch_line = lines[++i];
|
||||||
|
|
||||||
|
// Patch line may contain comments
|
||||||
|
if (StartsWith(patch_line, "//")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Start of new patch
|
// Start of new patch
|
||||||
if (StartsWith(patch_line, "@enabled") || StartsWith(patch_line, "@disabled")) {
|
if (StartsWith(patch_line, "@enabled") || StartsWith(patch_line, "@disabled")) {
|
||||||
--i;
|
--i;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue