fix segfault during bb quest loading

This commit is contained in:
Martin Michelsen
2022-05-11 23:22:30 -07:00
parent 711a4b815c
commit 4af86e1a4d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -566,7 +566,7 @@ struct S_GuildCardSearchResult_BB_41 : S_GuildCardSearchResult<PSOCommandHeaderB
struct S_OpenFile_PC_GC_44_A6 { struct S_OpenFile_PC_GC_44_A6 {
ptext<char, 0x20> name; ptext<char, 0x20> name;
le_uint16_t unused; parray<uint8_t, 2> unused;
le_uint16_t flags; // 0 = download quest, 2 = online quest, 3 = Episode 3 le_uint16_t flags; // 0 = download quest, 2 = online quest, 3 = Episode 3
ptext<char, 0x10> filename; ptext<char, 0x10> filename;
le_uint32_t file_size; le_uint32_t file_size;
+1 -1
View File
@@ -1375,7 +1375,7 @@ void send_quest_open_file_t(
default: default:
throw logic_error("invalid quest file type"); throw logic_error("invalid quest file type");
} }
cmd.unused = 0; cmd.unused.clear();
cmd.file_size = file_size; cmd.file_size = file_size;
cmd.filename = filename.c_str(); cmd.filename = filename.c_str();
send_command_t(c, command_num, 0x00, cmd); send_command_t(c, command_num, 0x00, cmd);