[fs] fix crash on '#' comments in pchtxt patches (#4124)

Adds `#` as a valid pchtxt comment, and fixes a crash that could occur
when using odd-length values

This patch was sent by Adam Kittelson <adam@apathydrive.com>

Signed-off-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Cole Avenue <cole@melisand.re>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4124
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
crueter
2026-07-25 21:20:04 +02:00
parent 0133caf702
commit b9a88297cb
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ void IPSwitchCompiler::Parse() {
const auto& patch_line = lines[++i];
// Patch line may contain comments
if (StartsWith(patch_line, "//")) {
if (StartsWith(patch_line, "//") || StartsWith(patch_line, "#")) {
continue;
}