mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
improved the error reporting of the network unpacker
This commit is contained in:
parent
530dace4c9
commit
5e3f740220
|
@ -217,9 +217,9 @@ if gen_network_source:
|
|||
lines += ['{']
|
||||
lines += ['\tvoid *msg;']
|
||||
lines += ['\tmsg_failed_on = "";']
|
||||
lines += ['\tif(type < 0 || type >= NUM_NETMSGTYPES) return 0;']
|
||||
lines += ['\tif(type < 0 || type >= NUM_NETMSGTYPES) { msg_failed_on = "(type out of range)"; return 0; }']
|
||||
lines += ['\tmsg = secure_unpack_funcs[type]();']
|
||||
lines += ['\tif(msg_unpack_error()) return 0;']
|
||||
lines += ['\tif(msg_unpack_error()) { msg_failed_on = "(unpack error)"; return 0; }']
|
||||
lines += ['\treturn msg;']
|
||||
lines += ['};']
|
||||
lines += ['']
|
||||
|
|
Loading…
Reference in a new issue