From 0d57bee368ac5bf7bc1a0d352673468dffa5d2f8 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 21 Jul 2022 01:07:01 -0700 Subject: [PATCH] be explicit about size rounding --- src/SendCommands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SendCommands.cc b/src/SendCommands.cc index af3568ca..5ad7b1d2 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -245,7 +245,7 @@ void send_function_call( w.put_u32b(key); // Round size up to a multiple of 4 for encryption - data.resize(data.size() + 3 & ~3); + data.resize((data.size() + 3) & ~3); // For this format, the code section is decrypted without byteswapping on // the client (GameCube), which is big-endian, so we have to treat the data