Use network byte order for struct unpacking on the lobby server (rather than native byte ordering)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3666 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-02-03 16:51:56 +00:00
parent 4a77f3d8b0
commit 748adec208
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ class Game:
def setData(self, d):
""" decode the c-structure from the server into local varialbles"""
(self.description, self.size, self.flags, self.host, self.maxPlayers, self.currentPlayers,
self.user1, self.user2, self.user3, self.user4 ) = struct.unpack("64sII16sIIIIII", d)
self.user1, self.user2, self.user3, self.user4 ) = struct.unpack("!64sII16sIIIIII", d)
self.description=self.description.strip("\x00")
self.host=self.host.strip("\x00")
logging.debug("Game: %s %s %s %s" % ( self.host, self.description, self.maxPlayers, self.currentPlayers))