aboutsummaryrefslogtreecommitdiff
path: root/src/target/nds32_disassembler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/nds32_disassembler.c')
-rw-r--r--src/target/nds32_disassembler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/nds32_disassembler.c b/src/target/nds32_disassembler.c
index 0cfd197..0bf74e1 100644
--- a/src/target/nds32_disassembler.c
+++ b/src/target/nds32_disassembler.c
@@ -2849,7 +2849,7 @@ static uint32_t field_mask[9] = {
static uint8_t nds32_extract_field_8u(uint16_t opcode, uint32_t start, uint32_t length)
{
- if (0 < length && length < 9)
+ if (length > 0 && length < 9)
return (opcode >> start) & field_mask[length];
return 0;