Skip to content

Commit

Permalink
ppc: wrong comparison in printOperand(). bug found by Coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed May 30, 2014
1 parent ea16de9 commit 2c20a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/PowerPC/PPCInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
else
SStream_concat(O, "%u", imm);
} else {
if (imm < HEX_THRESHOLD)
if (imm < -HEX_THRESHOLD)
SStream_concat(O, "-0x%x", -imm);
else
SStream_concat(O, "-%u", -imm);
Expand Down

0 comments on commit 2c20a1b

Please sign in to comment.