diff --git a/include/form.cpp b/include/form.cpp index 60db4f250..2a6f3da37 100755 --- a/include/form.cpp +++ b/include/form.cpp @@ -3128,8 +3128,7 @@ void TForm::print_general(ostream& out) const out << " INIZIO_POS " << _ipx << " " << _ipy << "\n"; out << " FINE_POS " << _fpx << "\n"; } - char fn[12]; strncpy(fn, _fink, 11); fn[11] = '\0'; - out << " GRID \"" << (const char*)fn << "\"\n"; + out << " GRID \"" << _fink << "\"\n"; out << "END\n" << endl; } @@ -4068,9 +4067,7 @@ bool TForm::write_profile() form.put("IPX", _ipx); form.put("IPY", _ipy); form.put("FPX", _fpx); - TString16 fk(_fink); - fk.cut(11); - form.put("GRID", fk); + form.put("GRID", _fink); form.rewrite(); _dirty=FALSE; } @@ -4181,9 +4178,7 @@ void TForm::read( forms.put("IPX", _ipx); forms.put("IPY", _ipy); forms.put("FPX", _fpx); - TString16 fk(_fink); - fk.cut(11); - forms.put("GRID",fk); + forms.put("GRID", _fink); forms.write(); } else _desc = forms.get("DESC"); @@ -4293,7 +4288,7 @@ void TForm::get_compulsory_specials() void TForm::set_fincatura(const char* s) { - strncpy(_fink,s,sizeof(_fink)); + _fink = s; _fink.cut(11); printer().set_fincatura(_fink); } diff --git a/include/form.h b/include/form.h index 12ceb331f..1a26d2c5f 100755 --- a/include/form.h +++ b/include/form.h @@ -132,7 +132,7 @@ class TForm : public TObject // @cmember:(INTERNAL) Descrizione del formato TString _desc; // @cmember:(INTERNAL) Array di caratteri di fincatura - char _fink[11]; + TString16 _fink; // @cmember:(INTERNAL) Handler di default della testata di stampa static void header_handler(TPrinter& p);