Skip to content

Commit

Permalink
fix: Bring back accidentally removed code when applying suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
netrome committed Oct 1, 2024
1 parent 09a8f84 commit 6e326e6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions fuel-vm/src/interpreter/alu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ where
}
}

if let Ok(expo) = u32::try_from(c) {
Word::pow(b, expo).unwrap()
} else if b < 2 {
(b, false)
} else {
(0, true)
}
pub(crate) fn exp(b: Word, c: Word) -> (Word, bool) {
if let Ok(expo) = u32::try_from(c) {
(Word::checked_pow(b, expo).unwrap(), false)
} else if b < 2 {
(b, false)
} else {
(0, true)
}
}

pub(crate) struct AluCommonReg<'a> {
pub of: RegMut<'a, OF>,
Expand Down

0 comments on commit 6e326e6

Please sign in to comment.