This commit is contained in:
Nicholas Ward 2023-04-19 14:56:08 -07:00
parent cb23bfcade
commit 6d84b988ba
2 changed files with 6 additions and 2 deletions

View File

@ -56,6 +56,7 @@ e_zero_return:
MUL // logical and
%jumpi(b_and_e_zero)
// End of special cases.
// We store the repeated-squares accumulator x_i in scratch_1, starting with x_0 := b.
DUP1

View File

@ -299,7 +299,10 @@ fn test_modexp_bignum(b: BigUint, e: BigUint, m: BigUint, expected_output: BigUi
scratch_5.into(),
],
)?;
new_memory.resize(new_memory.len().max(output_start_loc + output_len), 0.into());
new_memory.resize(
new_memory.len().max(output_start_loc + output_len),
0.into(),
);
let output = mem_vec_to_biguint(&new_memory[output_start_loc..output_start_loc + output_len]);
assert_eq!(output, expected_output);