Skip to content

Commit

Permalink
fix image table assigner
Browse files Browse the repository at this point in the history
  • Loading branch information
junyu0312 committed Dec 14, 2023
1 parent 6773632 commit d861066
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/zkwasm/src/circuits/utils/image_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl ImageTableAssigner {
&mut self,
mut padding_handler: impl FnMut(usize, usize) -> Result<Vec<T>, Error>,
) -> Result<Vec<T>, Error> {
padding_handler(self.padding_offset, self.padding_offset)
padding_handler(self.padding_offset, self.init_memory_offset)
}

pub fn exec_init_memory_entries<T, Error>(
Expand Down Expand Up @@ -281,8 +281,8 @@ impl<F: FieldExt> EncodeCompilationTableValues<F> for CompilationTable {
};

let mut assigner = ImageTableAssigner::new(
self.itable.entries().len(),
self.br_table.entries().len() + self.elem_table.entries().len(),
self.itable.entries().len() + 1,
self.br_table.entries().len() + self.elem_table.entries().len() + 1,
page_capability,
);

Expand Down

0 comments on commit d861066

Please sign in to comment.