diff options
author | iximeow <me@iximeow.net> | 2019-08-16 02:27:35 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | 3a4e860a626ee03cb4eec4e9a03e5ac5b2e20d75 (patch) | |
tree | d16bf6ea36b3e3d52a064c4508157da892bec301 /src/display.rs | |
parent | c638fb0c342d0284a6a7bff6ecea8302c8cb83ba (diff) |
fix panicky negation in debug builds
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 <T: std::fmt::Write> Colorize<T> 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) }; |