Skip to content

Commit

Permalink
fix segfile for single segment
Browse files Browse the repository at this point in the history
  • Loading branch information
weilzkm committed Sep 27, 2024
1 parent 40647a0 commit 8e99d47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prover/examples/zkmips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ fn prove_sha2_rust() {
log::info!("public value: {} in hex", hex::encode(value));

if seg_num == 1 {
prove_single_seg_common(&seg_path, "", "", "")
let seg_file = format!("{seg_path}/{}", 0);
prove_single_seg_common(&seg_file, "", "", "")
} else {
prove_multi_seg_common(&seg_path, "", "", "", seg_num, 0).unwrap()
}
Expand Down Expand Up @@ -311,7 +312,8 @@ fn prove_sha2_go() {
log::info!("public value: {:X?}", value);

if seg_num == 1 {
prove_single_seg_common(&seg_path, "", "", "")
let seg_file = format!("{seg_path}/{}", 0);
prove_single_seg_common(&seg_file, "", "", "")
} else {
prove_multi_seg_common(&seg_path, "", "", "", seg_num, 0).unwrap()
}
Expand Down

0 comments on commit 8e99d47

Please sign in to comment.