From 2c20a1b5a3bc85c2f5390faaa9b35c41d394555f Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 30 May 2014 17:00:20 +0800 Subject: [PATCH] ppc: wrong comparison in printOperand(). bug found by Coverity --- arch/PowerPC/PPCInstPrinter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c index 784e65498..8a1d542d6 100644 --- a/arch/PowerPC/PPCInstPrinter.c +++ b/arch/PowerPC/PPCInstPrinter.c @@ -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);