From 28400a12f16d51558f89dcbbb273bccf1e40c836 Mon Sep 17 00:00:00 2001
From: Christoph Oelckers <coelckers@users.noreply.github.com>
Date: Wed, 25 Oct 2023 17:25:57 +0200
Subject: [PATCH] fixed savegame file name check.

Writer and reader for the savegame metadata were mismatched so the readback of non-ASCII filenames failed.
---
 src/common/engine/serializer.cpp | 1 +
 src/g_game.cpp                   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/common/engine/serializer.cpp b/src/common/engine/serializer.cpp
index 34fd6956b5..7fbf7adc6b 100644
--- a/src/common/engine/serializer.cpp
+++ b/src/common/engine/serializer.cpp
@@ -1,4 +1,5 @@
 /*
+/*
 ** serializer.cpp
 ** Savegame wrapper around RapidJSON
 **
diff --git a/src/g_game.cpp b/src/g_game.cpp
index 6d891a2e48..90f12896bd 100644
--- a/src/g_game.cpp
+++ b/src/g_game.cpp
@@ -1892,9 +1892,9 @@ bool G_CheckSaveGameWads (FSerializer &arc, bool printwarn)
 	bool printRequires = false;
 	FString text;
 
-	arc("Game WAD", text);
+	text = arc.GetString("Game WAD");
 	CheckSingleWad (text.GetChars(), printRequires, printwarn);
-	arc("Map WAD", text);
+	text = arc.GetString("Map WAD");
 	CheckSingleWad (text.GetChars(), printRequires, printwarn);
 
 	if (printRequires)