Fix Segmentation Fault FB var declaration in a single list.
authorManuele Conti <conti.ma@alice.it>
Thu, 16 Aug 2012 22:44:38 +0200
changeset 641 5681f600ac18
parent 640 ffa02cf2b335
child 642 2ca07e3b08d6
child 643 1cc0e1ca2aad
Fix Segmentation Fault FB var declaration in a single list.
stage4/generate_c/generate_var_list.cc
--- a/stage4/generate_c/generate_var_list.cc	Mon Aug 27 17:58:07 2012 +0100
+++ b/stage4/generate_c/generate_var_list.cc	Thu Aug 16 22:44:38 2012 +0200
@@ -330,11 +330,14 @@
           this->current_var_type_name->accept(*this);
           s4o.print(";\n");
           SYMBOL *current_name;
+          symbol_c *tmp_var_type;
           current_name = new SYMBOL;
           current_name->symbol = symbol;
+          tmp_var_type = this->current_var_type_symbol;
           current_symbol_list.push_back(*current_name);
           this->current_var_type_symbol->accept(*this);
           current_symbol_list.pop_back();
+          this->current_var_type_symbol = tmp_var_type;
           break;
         case search_type_symbol_c::array_vtc:
           this->current_var_type_name->accept(*this);