summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GameCube/include/game_patch/game_patch.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/GameCube/include/game_patch/game_patch.h b/GameCube/include/game_patch/game_patch.h
index 34a81c9..9ac49dd 100644
--- a/GameCube/include/game_patch/game_patch.h
+++ b/GameCube/include/game_patch/game_patch.h
@@ -10,8 +10,8 @@
#include <cstdint>
// Instruction templates
-#define ASM_LOAD_IMMEDIATE( register, value ) ( 0x38000000 + ( register * 0x200000 ) ) | static_cast<int16_t>( value )
-#define ASM_COMPARE_WORD_IMMEDIATE( register, value ) ( 0x2C000000 + ( register * 0x10000 ) ) | static_cast<int16_t>( value )
+#define ASM_LOAD_IMMEDIATE( register, value ) ( 0x38000000 + ( register * 0x200000 ) ) | ( value & 0xFFFF )
+#define ASM_COMPARE_WORD_IMMEDIATE( register, value ) ( 0x2C000000 + ( register * 0x10000 ) ) | ( value & 0xFFFF )
namespace mod::game_patch
{