Skip to content

Commit

Permalink
Merge pull request #5 from Fenixin/fix-status-choice
Browse files Browse the repository at this point in the history
Fix status choice.
  • Loading branch information
MidnightLightning committed Jun 21, 2011
2 parents e7d3ba0 + 6e504f0 commit adeffef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nbt/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def parse_header(self):
elif offset < 2 and offset != 0:
status = self.STATUS_CHUNK_IN_HEADER

elif (offset + length)*4 > self.size:
# (don't forget!) offset and length comes in sectors of 4096 bytes
elif (offset + length)*4096 > self.size:
status = self.STATUS_CHUNK_OUT_OF_FILE

else:
Expand Down

0 comments on commit adeffef

Please sign in to comment.