Skip to content

Commit

Permalink
Added a catch for keys shorter then 9 characters in Mojangs leveldb.
Browse files Browse the repository at this point in the history
Im dumb. Should have done this at the time. Never caught the issue :-(
Sorry guys

Fixes #466
  • Loading branch information
Rubisk committed Aug 9, 2015
1 parent 7498b25 commit 32dec08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pymclevel/leveldbpocket.py
Expand Up @@ -260,6 +260,11 @@ def getAllChunks(self, readOptions=None):
it.SeekToFirst()
while it.Valid():
key = it.key()

if len(key) < 9:
it.Next()
continue

raw_x = key[0:4]
raw_z = key[4:8]
t = key[8]
Expand Down

1 comment on commit 32dec08

@D3thw0lf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool this was fast...I'll try this now. :)

/edit not working for me (commented with log in issue)

Please sign in to comment.