fix the bug of buffer read
This commit is contained in:
parent
42b9cebb9d
commit
3ea717043c
|
|
@ -98,7 +98,7 @@ class Searcher(object):
|
||||||
def read(self, offset: int, length: int):
|
def read(self, offset: int, length: int):
|
||||||
# check the content buffer first
|
# check the content buffer first
|
||||||
if self.c_buffer != None:
|
if self.c_buffer != None:
|
||||||
return self.c_buffer[offset, offset + length]
|
return self.c_buffer[offset:offset+length]
|
||||||
|
|
||||||
# load the buffer from file
|
# load the buffer from file
|
||||||
self.__handle.seek(offset)
|
self.__handle.seek(offset)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue