diff --git a/src/include/form.cpp b/src/include/form.cpp index 9049f4f5c..e13655e82 100755 --- a/src/include/form.cpp +++ b/src/include/form.cpp @@ -2639,6 +2639,7 @@ bool TForm::parse_use(TScanner& scanner, TString & filter) { TToken_string ordexpr(parse_sortexpr(scanner)); _cursor = new TSorted_cursor(_relation, ordexpr, "", key); + _sorted_cursor = true; } else { @@ -3014,8 +3015,9 @@ bool TForm::reread( // Legge le modifiche su archivio e poi e' finita. s->set_dirty(FALSE); TLocalisamfile rprof(LF_RFORM); - const char sez[3] = {sec,p+'0','\0'}; - rprof.zero(); + TString4 sez; sez << sec << p; + + rprof.zero(); rprof.put("TIPOPROF", _name); rprof.put("CODPROF", _code); rprof.put("SEZ", sez); @@ -4460,8 +4462,9 @@ bool TForm::write_profile() TPrint_section* sec = exist(sc, pt); if (sec != NULL && sec->dirty()) { - const char codsez[3] = { sc, pt+'0', '\0' }; - cur.zero(); + TString4 codsez; codsez << sc << pt; + + cur.zero(); cur.put("TIPOPROF", name()); cur.put("CODPROF", code()); cur.put("SEZ", codsez); @@ -4511,6 +4514,7 @@ void TForm::init() _msg_add_enabled = TRUE; _magic_currency = FALSE; _exchange = NULL; + _sorted_cursor = false; } // @doc EXTERNAL