mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-10 21:55:11 +01:00
Correct struct unpack
This commit is contained in:
parent
3518863b67
commit
958eddfd37
@ -141,7 +141,7 @@ class ConnectToBrokerPacket(Packet):
|
||||
|
||||
if self.version >= 4:
|
||||
self.avatar = struct.unpack(">L", data[88:92])[0]
|
||||
self.screenshot = struct.unpack(">%dB" % (image.SCREENSHOT_SIZE),
|
||||
self.screenshot = struct.unpack(">%ds" % (image.SCREENSHOT_SIZE),
|
||||
data[92:92 + image.SCREENSHOT_SIZE])[0]
|
||||
print "VOBB", self.screenshot
|
||||
|
||||
@ -192,7 +192,7 @@ class ListPeersPacket(Packet):
|
||||
0, peer.id, self.version)
|
||||
if self.version >= 4:
|
||||
print "Marshalling", peer.screenshot
|
||||
out = out + struct.pack(">L%dB" % (image.SCREENSHOT_SIZE),
|
||||
out = out + struct.pack(">L%ds" % (image.SCREENSHOT_SIZE),
|
||||
peer.avatar, peer.screenshot)
|
||||
|
||||
return Packet.marshal(self) + out
|
||||
|
Loading…
Reference in New Issue
Block a user