From ba1d2edb9530e606afa4941bd7567efb2bed1803 Mon Sep 17 00:00:00 2001 From: bonazzi <bonazzi@c028cbd2-c16b-5b4b-a496-9718f37d4682> Date: Mon, 2 Apr 2018 10:09:41 +0000 Subject: [PATCH] Patch level : 12.0 556 Files correlati : ba8.exe Costruttore variant nullo errato, non trovava piu i campi della query principale dalla sottosezione. git-svn-id: svn://10.65.10.50/branches/R_10_00@24450 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- src/include/recset.cpp | 22 +++++++--------------- src/include/variant.cpp | 2 +- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/include/recset.cpp b/src/include/recset.cpp index b0b500ca4..f2c98c14b 100755 --- a/src/include/recset.cpp +++ b/src/include/recset.cpp @@ -579,11 +579,7 @@ const TVariant& TRecordset::get_var(const char* name) const bool TRecordset::set_var(const char* name, const TVariant& var, bool create) { bool ok = false; - - TVariant* old = NULL; - if(_var.is_key(name)) - old = (TVariant*)_var.objptr(name); - + TVariant* old = (TVariant*)_var.objptr(name); if (old != NULL) { *old = var; @@ -1562,12 +1558,8 @@ TCursor* TISAM_recordset::cursor() const TParagraph_string msg(use, 64); TPerformance_profiler prof(msg.get(0)); TISAM_recordset* my = (TISAM_recordset*)this; -#ifdef LINUX - string s(use.get_buffer()); - istringstream instr(s); -#else + istrstream instr(use.get_buffer(), use.len()+1); //"barata" x aggiungere il carattere finale -#endif TCursor_parser parser(instr, my->_column); my->_relation = parser.get_relation(); @@ -1615,17 +1607,17 @@ bool TISAM_recordset::move_to(TRecnotype pos) { TCursor* c = cursor(); bool ok = c != NULL && pos >= 0 && pos < c->items(); - if (ok) - { - *c = pos; - } + if (ok) + { + *c = pos; + } else if (pos >= c->items()) *c = c->items(); else if (pos < 0L) *c = 0L; - return ok; + return ok; } void TISAM_recordset::reset() diff --git a/src/include/variant.cpp b/src/include/variant.cpp index f27549967..31f093c79 100755 --- a/src/include/variant.cpp +++ b/src/include/variant.cpp @@ -5,7 +5,7 @@ // TVariant /////////////////////////////////////////////////////////// -const TVariant NULL_VARIANT = ""; +const TVariant NULL_VARIANT; void TVariant::set_null() {