diff options
| author | iximeow <me@iximeow.net> | 2024-06-23 15:31:25 -0700 | 
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2024-06-23 15:31:25 -0700 | 
| commit | 1fdd243276d7184bbc0acb0bda349283cf8cfbda (patch) | |
| tree | c97e431bcd9be28b5ca1276a019c72b0c7e1ab07 /src/long_mode | |
| parent | 9d9bb9b8fbc5a04f40b927093cd3ba8e562f941d (diff) | |
fuzz caught negation bug
Diffstat (limited to 'src/long_mode')
| -rw-r--r-- | src/long_mode/display.rs | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 4f4e739..37f832a 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -439,7 +439,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>              let mut v = disp as u32;              if disp < 0 {                  self.f.write_fixed_size("- 0x")?; -                v = -disp as u32; +                v = disp.unsigned_abs();              } else {                  self.f.write_fixed_size("+ 0x")?;              } @@ -472,7 +472,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>              let mut v = disp as u32;              if disp < 0 {                  self.f.write_fixed_size("- 0x")?; -                v = -disp as u32; +                v = disp.unsigned_abs();              } else {                  self.f.write_fixed_size("+ 0x")?;              } @@ -502,7 +502,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>              let mut v = disp as u32;              if disp < 0 {                  self.f.write_fixed_size("- 0x")?; -                v = -disp as u32; +                v = disp.unsigned_abs();              } else {                  self.f.write_fixed_size("+ 0x")?;              } @@ -517,7 +517,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>          let mut v = disp as u32;          if disp < 0 {              self.f.write_fixed_size("- 0x")?; -            v = -disp as u32; +            v = disp.unsigned_abs();          } else {              self.f.write_fixed_size("+ 0x")?;          } @@ -557,7 +557,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>          let mut v = disp as u32;          if disp < 0 {              self.f.write_fixed_size("- 0x")?; -            v = -disp as u32; +            v = disp.unsigned_abs();          } else {              self.f.write_fixed_size("+ 0x")?;          } @@ -588,7 +588,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>          let mut v = disp as u32;          if disp < 0 {              self.f.write_fixed_size("- 0x")?; -            v = -disp as u32; +            v = disp.unsigned_abs();          } else {              self.f.write_fixed_size("+ 0x")?;          } @@ -623,7 +623,7 @@ impl <T: DisplaySink> super::OperandVisitor for DisplayingOperandVisitor<'_, T>          let mut v = disp as u32;          if disp < 0 {              self.f.write_fixed_size("- 0x")?; -            v = -disp as u32; +            v = disp.unsigned_abs();          } else {              self.f.write_fixed_size("+ 0x")?;          }  | 
