about summary refs log tree commit diff
path: root/datasrc
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-12-19 11:25:14 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-12-19 11:25:14 +0000
commit5e3f7402206e269e013c050a5a0e98a579a0246e (patch)
tree3d6fdfc99f728580cebea71661317847dc19b865 /datasrc
parent530dace4c97ea4361e4db477abbf388a497ac4e3 (diff)
downloadzcatch-5e3f7402206e269e013c050a5a0e98a579a0246e.tar.gz
zcatch-5e3f7402206e269e013c050a5a0e98a579a0246e.zip
improved the error reporting of the network unpacker
Diffstat (limited to 'datasrc')
-rw-r--r--datasrc/compile.py4
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 += ['']