Skip to content

Commit 72c0a86

Browse files
fix: incorrect variable
1 parent d73585f commit 72c0a86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mapbuffer/mapbuffer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ def size(self, label:int) -> int:
237237
pos = self.find_index_position(label)
238238
index = self.index()
239239
N = index.shape[0]
240-
offset = index[i,1]
240+
offset = index[pos,1]
241241

242242
crc_compensation = 0
243243
if self.format_version > 0:
244244
crc_compensation = 4
245245

246-
if i < N - 1:
247-
next_offset = index[i+1,1]
246+
if pos < N - 1:
247+
next_offset = index[pos+1,1]
248248
return next_offset - offset - crc_compensation
249249
else:
250250
return len(self.buffer) - offset - crc_compensation

0 commit comments

Comments
 (0)