Skip to content

Commit 955c872

Browse files
committed
truncate ICSR
1 parent 022d2d7 commit 955c872

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortex-m-rt/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ macro_rules! exception {
769769

770770
// NOTE not volatile so the compiler can opt the load operation away if the value is
771771
// unused
772-
f(core::ptr::read(SCB_ICSR) as i16 - 16)
772+
f(core::ptr::read(SCB_ICSR) as u8 as i16 - 16)
773773
}
774774
};
775775

0 commit comments

Comments
 (0)