From dc7368e4af8c94815b4cf39cde498fc5d83755ec Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Mon, 23 Dec 2024 00:03:38 -0800 Subject: [PATCH] fix qst file format bug --- src/Quest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Quest.cc b/src/Quest.cc index 9d7f9255..b3fb8862 100644 --- a/src/Quest.cc +++ b/src/Quest.cc @@ -1228,7 +1228,7 @@ unordered_map decode_qst_data(const string& data) { // the filename was shifted over by one byte. To detect this, we check if // the V3 type field has a reasonable value, and if not, we assume the file // is for PSO DC. - if (r.pget_u32l(sizeof(PSOCommandHeaderDCV3) + offsetof(S_OpenFile_PC_GC_44_A6, type)) > 3) { + if (r.pget_u16l(sizeof(PSOCommandHeaderDCV3) + offsetof(S_OpenFile_PC_GC_44_A6, type)) > 3) { return decode_qst_data_t(data); } else { return decode_qst_data_t(data);