Object can have index from 1 to 'maximum'

This commit is contained in:
Dhananjay Balan
2013-07-08 21:40:21 +05:30
committed by Chris Johns
parent 10bcd5d4dc
commit ce55b57c4c

View File

@@ -68,7 +68,7 @@ class infotables:
n = self.name(api, _class)
self.load(n)
max = self.maximum(api, _class)
if index >= max:
if index > max:
raise IndexError('object index out of range (%d)' % (max))
table_type = self.tables_types[n]
expr = '(' + table_type[0] + '*)' + \