Fix two important typo errors in Arrays.

This commit is contained in:
Mike Auty
2014-12-30 04:08:59 +00:00
parent 43211a621c
commit 04720d5ab9
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -256,6 +256,8 @@ class Array(interfaces.objects.ObjectInterface, collections.Sequence):
def __getitem__(self, i):
"""Returns the i-th item from the array"""
if i >= self._count or 0 > i:
raise IndexError
return self._target(context = self._context, layer_name = self._layer_name,
offset = self._offset + (self._target.size * i), parent = self)
+1 -1
View File
@@ -69,7 +69,7 @@ class VTypeSymbolTable(interfaces.symbols.SymbolTableInterface):
# Add specific additional parameters, etc
update = {}
if structure_name == 'array':
update['count'] = dictionary[1],
update['count'] = dictionary[1]
update['target'] = self._vtypedict_to_template(dictionary[2])
elif structure_name == 'pointer':
update["target"] = self._vtypedict_to_template(dictionary[1])