aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-30 14:23:27 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-30 14:23:27 +0000
commitaa60b19995fb0100ee16d57265e4096566b22226 (patch)
tree25820e7e74e90f8268eef58e01c3b1516c71ead5 /main.py
parentupdate (diff)
downloadfaultreiber-aa60b19995fb0100ee16d57265e4096566b22226.tar.gz
faultreiber-aa60b19995fb0100ee16d57265e4096566b22226.zip
update
Diffstat (limited to '')
-rwxr-xr-xmain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.py b/main.py
index 14c5846..4a02992 100755
--- a/main.py
+++ b/main.py
@@ -410,9 +410,10 @@ class CodeGen(object):
if "delimiter" in child.attrib:
delimiter = child.attrib["delimiter"]
for_read = "int32_t " + child.attrib["name"] + "_del_pos =" + text.c_read_until_delimiter_proto.replace("XXX", delimiter) + ";\n"
- for_read += "(*dummy)->" + child.attrib["name"] + "=" +alloc+"(" + child.attrib["name"] + "_del_pos);\n"
+ for_read += "(*dummy)->" + child.attrib["name"] + "=" +alloc+"(" + child.attrib["name"] + "_del_pos + 1);\n"
for_read +=text.c_void_manager_proto.replace("XXX", "(*dummy)->" + child.attrib["name"]);
for_read += text.c_read_gen_2_no.replace("XXX", "(*dummy)" + "->"+ child.attrib["name"] + array_subscript).replace("YYY", child.attrib["name"]+"_del_pos")
+ for_read += "(*dummy)->" + child.attrib["name"] + "[" + child.attrib["name"] + "_del_pos] = 0;\n"
else:
for_read = "(*dummy)->" + child.attrib["name"] + " = " + alloc+"(" + ref_size + "+1);\n"
for_read += text.c_void_manager_proto.replace("XXX", "(*dummy)->" + child.attrib["name"]);