Fix C code generation of FB invocation in IL.
authormjsousa
Thu, 22 Aug 2013 16:51:22 +0100
changeset 842 2415912b0aa0
parent 841 aed36f08545d
child 843 f9a059c24aea
Fix C code generation of FB invocation in IL.
stage4/generate_c/generate_c_il.cc
--- a/stage4/generate_c/generate_c_il.cc	Thu Aug 22 07:39:33 2013 +0100
+++ b/stage4/generate_c/generate_c_il.cc	Thu Aug 22 16:51:22 2013 +0100
@@ -410,9 +410,10 @@
             symbol_c* fb_value = NULL,
             bool negative = false) {
 
-      bool type_is_complex = search_var_instance_decl->type_is_complex(symbol);
+      bool type_is_complex = false;
       if (fb_symbol == NULL) {
         unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
+        type_is_complex = search_var_instance_decl->type_is_complex(symbol);
         if (vartype == search_var_instance_decl_c::external_vt) {
           if (search_var_instance_decl->type_is_fb(symbol))
             s4o.print(SET_EXTERNAL_FB);