Skip to content

Commit

Permalink
Fix mips.gnu on BE host ##endian
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 13, 2024
1 parent 05bf34a commit 4cb5fb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libr/arch/p/mips_gnu/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,11 @@ static bool decode(RArchSession *as, RAnalOp *op, RAnalOpMask mask) {
op->addr = addr;
// Be endian aware
if (len >= 4) {
#if R_SYS_ENDIAN
opcode = r_read_ble32 (b, !R_ARCH_CONFIG_IS_BIG_ENDIAN (as->config));
#else
opcode = r_read_ble32 (b, R_ARCH_CONFIG_IS_BIG_ENDIAN (as->config));
#endif
} else if (len >= 2) {
opcode = r_read_ble16 (b, R_ARCH_CONFIG_IS_BIG_ENDIAN (as->config));
}
Expand Down

0 comments on commit 4cb5fb1

Please sign in to comment.