Skip to content

Commit

Permalink
Fix bug when data structures are indexed by MemValue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Dec 5, 2023
1 parent 3e31341 commit 1f8f784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Compiler/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5638,6 +5638,7 @@ def address(self):
def address(self, address):
self._address = address

@read_mem_value
def get_address(self, index, size=None):
if isinstance(index, (_secret, _single)):
raise CompilerError('need cleartext index')
Expand Down Expand Up @@ -6146,6 +6147,7 @@ def __init__(self, sizes, value_type, address, index, debug=None):
if debug:
library.print_ln_if(self.address + reduce(operator.mul, self.sizes) * self.value_type.n_elements() > program.allocated_mem[self.value_type.reg_type], 'AOF%d:' % len(self.sizes) + self.debug)

@read_mem_value
def __getitem__(self, index):
""" Part access.
Expand Down

0 comments on commit 1f8f784

Please sign in to comment.