Permalink
Browse files

Long datatype fix, http://wiki.vg/Protocol says it's 8 bytes and 'l' …

…only reads 4
  • Loading branch information...
Pasi Saarinen
Pasi Saarinen committed Jan 3, 2012
1 parent be8b315 commit 7949ef256bb70293d6547fbb0508b564846cd4ff
Showing with 2 additions and 2 deletions.
  1. +2 −2 mc3p/parsing.py
View
@@ -80,10 +80,10 @@ def emit_int(i):
MC_int = Parsem(parse_int, emit_int)
def parse_long(stream):
- return struct.unpack_from(">l",stream.read(8))[0]
+ return struct.unpack_from(">q",stream.read(8))[0]
def emit_long(l):
- return struct.pack(">l",l)
+ return struct.pack(">q",l)
MC_long = Parsem(parse_long, emit_long)

0 comments on commit 7949ef2

Please sign in to comment.