From fdb7c8bff809121b19be67d5d986c29cac4cd7e8 Mon Sep 17 00:00:00 2001 From: Louis Rubet Date: Tue, 2 May 2017 11:33:37 +0200 Subject: [PATCH] #49: debug autoeval issue --- src/parse.h | 2 ++ src/rpn-store.h | 2 +- src/rpn.cpp | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parse.h b/src/parse.h index 434395d..394dc95 100644 --- a/src/parse.h +++ b/src/parse.h @@ -214,6 +214,7 @@ static bool get_symbol(const string& entry, program& prog, string& remaining_ent // allocate and set object symbol* new_obj = (symbol*)prog.allocate_back(obj_len, cmd_symbol); + new_obj->_auto_eval = false; new_obj->set("", 0); } else @@ -228,6 +229,7 @@ static bool get_symbol(const string& entry, program& prog, string& remaining_ent // allocate and set object symbol* new_obj = (symbol*)prog.allocate_back(obj_len, cmd_symbol); + new_obj->_auto_eval = false; new_obj->set(entry.substr(1, naked_entry_len).c_str(), naked_entry_len); } ret = true; diff --git a/src/rpn-store.h b/src/rpn-store.h index 2af601c..a26e421 100644 --- a/src/rpn-store.h +++ b/src/rpn-store.h @@ -69,7 +69,7 @@ void edit(void) // carefull : this is not a langage command void auto_rcl(symbol* symb) { - if (!symb->_auto_eval) + if (symb->_auto_eval) { object* obj; unsigned int size; diff --git a/src/rpn.cpp b/src/rpn.cpp index 182874f..37c1822 100644 --- a/src/rpn.cpp +++ b/src/rpn.cpp @@ -322,7 +322,6 @@ struct symbol : public object void set(const char* value, unsigned int len) { _type = cmd_symbol; - _auto_eval = false; if (value != NULL) { if (len>0)