Skip to content

Commit

Permalink
Fix is_consecutive init value.
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed May 13, 2024
1 parent 9962a11 commit 0a5943a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler/src/circom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ impl RegexAndDFA {
let mut circom: String = "".to_string();
circom += "\n";
circom += "\tsignal is_consecutive[msg_bytes+1][3];\n";
circom += "\tis_consecutive[msg_bytes][2] <== 1;\n";
circom += "\tis_consecutive[msg_bytes][2] <== 0;\n";
circom += "\tfor (var i = 0; i < msg_bytes; i++) {\n";
circom += &format!("\t\tis_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][{}] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2];\n", accepted_state);
circom += "\t\tis_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0];\n";
Expand Down

0 comments on commit 0a5943a

Please sign in to comment.