Skip to content

Commit

Permalink
Fix bug in wrapping_div
Browse files Browse the repository at this point in the history
See discussion, albeit one-sided, in:

  rust-lang/rfcs#964
  • Loading branch information
pnkfelix committed Apr 14, 2015
1 parent 4991c7a commit d8122ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/num/wrapping.rs
Expand Up @@ -232,7 +232,7 @@ macro_rules! signed_overflowing_impl {
#[inline(always)]
fn overflowing_div(self, rhs: $t) -> ($t, bool) {
if self == $t::MIN && rhs == -1 {
(1, true)
(self, true)
} else {
(self/rhs, false)
}
Expand Down

0 comments on commit d8122ee

Please sign in to comment.