From d0c3e1b7d812392a68bcd9eb9dee8b4da21dafe6 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 9 Feb 2024 16:29:35 -0800 Subject: [PATCH] fix Ep3 NTE 6xB5 masking --- src/ReceiveSubcommands.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 74f87a00..da8e7278 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -949,7 +949,12 @@ static void on_ep3_battle_subs(shared_ptr c, uint8_t command, uint8_t fl } string data(reinterpret_cast(orig_data), size); - set_mask_for_ep3_game_command(data.data(), data.size(), 0); + if (c->version() != Version::GC_EP3_NTE) { + set_mask_for_ep3_game_command(data.data(), data.size(), 0); + } else { + auto& new_header = check_size_t(data, 0xFFFF); + new_header.mask_key = 0; + } if (header.subsubcommand == 0x1A) { return;