aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-08-10 16:40:27 +0000
committerbloodstalker <thabogre@gmail.com>2018-08-10 16:40:27 +0000
commit426ebdfc06696cfece51938cd773fc752a932f32 (patch)
tree1ff49ca59c788b71fa8770588d1dd36522ca7819 /main.py
parentupdate (diff)
downloadfaultreiber-426ebdfc06696cfece51938cd773fc752a932f32.tar.gz
faultreiber-426ebdfc06696cfece51938cd773fc752a932f32.zip
update
Diffstat (limited to '')
-rwxr-xr-xmain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index 335935f..09cb73a 100755
--- a/main.py
+++ b/main.py
@@ -358,10 +358,10 @@ class CodeGen(object):
ref_node_name = pointer_remover(ref_node.attrib["name"])
if child_count == 1:
for_read = text.c_read_elem_sig_2.replace("XXX", ref_node_name).replace("YYY", "dummy->" + child.attrib["name"]) + ";\n"
- read_source.write(for_read)
+ read_source.write("dummy->" + child.attrib["name"] + "=" + for_read)
elif child_count > 1:
for_read = text.c_read_elem_sig_2.replace("XXX", ref_node_name).replace("YYY", "dummy->" + child.attrib["name"] + "[i]") + ";\n"
- read_source.write(for_read)
+ read_source.write("dummy->" + child.attrib["name"] + "=" + for_read)
else: # child_count == -1
count_name_str = child.attrib["count"][6:]
read_source.write("if (" + "dummy->" + get_node_name(count_name_str, elem) + ")\n")