From 3a4e860a626ee03cb4eec4e9a03e5ac5b2e20d75 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 16 Aug 2019 02:27:35 -0700 Subject: fix panicky negation in debug builds --- src/display.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/display.rs b/src/display.rs index 7ec7f0f..7d8c1b5 100644 --- a/src/display.rs +++ b/src/display.rs @@ -120,7 +120,7 @@ impl Colorize for Operand { } &Operand::RegDisp(ref spec, ref disp) => { let (sign, disp) = if *disp < 0 { - (true, -*disp) + (true, (-std::num::Wrapping(*disp)).0) } else { (false, *disp) }; -- cgit v1.1