mirror of
https://github.com/JoelBender/bacpypes
synced 2025-09-28 22:15:23 +08:00
wrong index check
This commit is contained in:
parent
61996f8aba
commit
79c019d995
|
@ -565,7 +565,7 @@ def ArrayOf(klass):
|
|||
|
||||
def __setitem__(self, item, value):
|
||||
# no wrapping index
|
||||
if (item < 1) or (item > self.value[0]):
|
||||
if (item < 0) or (item > self.value[0]):
|
||||
raise IndexError("index out of range")
|
||||
|
||||
# special length handling for index 0
|
||||
|
|
|
@ -563,7 +563,7 @@ def ArrayOf(klass):
|
|||
|
||||
def __setitem__(self, item, value):
|
||||
# no wrapping index
|
||||
if (item < 1) or (item > self.value[0]):
|
||||
if (item < 0) or (item > self.value[0]):
|
||||
raise IndexError("index out of range")
|
||||
|
||||
# special length handling for index 0
|
||||
|
|
|
@ -563,7 +563,7 @@ def ArrayOf(klass):
|
|||
|
||||
def __setitem__(self, item, value):
|
||||
# no wrapping index
|
||||
if (item < 1) or (item > self.value[0]):
|
||||
if (item < 0) or (item > self.value[0]):
|
||||
raise IndexError("index out of range")
|
||||
|
||||
# special length handling for index 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user