diff options
| -rw-r--r-- | datasrc/compile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/datasrc/compile.py b/datasrc/compile.py index 6258b905..179020fd 100644 --- a/datasrc/compile.py +++ b/datasrc/compile.py @@ -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 += [''] |