Skip to content

Commit bfa92a8

Browse files
author
Jorge Aparicio
committed
avoid division overflow in idivmod test
1 parent 9d74cf0 commit bfa92a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ mod tests {
193193

194194
fn idivmod(n: U32, d: U32) -> TestResult {
195195
let (n, d) = (n.0 as i32, d.0 as i32);
196-
if d == 0 {
196+
if d == 0 || (n == i32::min_value() && d == -1) {
197197
TestResult::discard()
198198
} else {
199199
let q: i32;

0 commit comments

Comments
 (0)