abort decoding query string on bad values

This commit is contained in:
Toad King
2014-05-25 00:10:33 -04:00
parent 4aede9bb33
commit 4809beaad7

View File

@@ -5,6 +5,10 @@ def parse_gamespy_message(message):
messages = {}
msg = message
if len(msg) == 0 or msg[0] != '\\':
# bad command, return nothing
return "", ""
while len(msg) > 0 and msg[0] == '\\' and "\\final\\" in msg:
# Find the command
# Don't search for more commands if there isn't a \final\, save the left over for the next packet