mirror of
https://github.com/sqlmapproject/sqlmap
synced 2026-01-25 09:36:22 +01:00
Minor fix for BigArray (now accepting negative indexes)
This commit is contained in:
parent
1c69eb5d30
commit
f00a776d8d
1 changed files with 2 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ class BigArray(list):
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
def __getitem__(self, y):
|
def __getitem__(self, y):
|
||||||
|
if y < 0:
|
||||||
|
y += len(self)
|
||||||
index = y / BIGARRAY_CHUNK_LENGTH
|
index = y / BIGARRAY_CHUNK_LENGTH
|
||||||
offset = y % BIGARRAY_CHUNK_LENGTH
|
offset = y % BIGARRAY_CHUNK_LENGTH
|
||||||
chunk = self.chunks[index]
|
chunk = self.chunks[index]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue