diff --git a/include/form.cpp b/include/form.cpp index 94fb90c12..7cbcdb681 100755 --- a/include/form.cpp +++ b/include/form.cpp @@ -4516,19 +4516,20 @@ bool TForm::print( // quanto resta da stampare sta nell'ultima pagina if (!fixed_pages() && set_body(0,FALSE) * word(to-i+1) <= pr.formlen()- set_header(1,FALSE) - set_footer(0,FALSE)) { - while (i < to && from >= 0) // stampa l'ultima pagina + while (i <= to && from >= 0) // stampa l'ultima pagina { - i++; set_last_page(TRUE); set_background(0, TRUE); set_header(0, TRUE); - if (cursor()) { + if (cursor()) + { *cursor() = i; set_body(0, TRUE); } + i++; } + break; } - break; } } diff --git a/include/mask.cpp b/include/mask.cpp index 110cc084c..fc1f0f7a8 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -171,11 +171,13 @@ void TMask::add_field(TMask_field* f) const short id = f->dlg(); if (id > 0 && id < 512) { -#ifdef DBG - if (_position.get_long(id)) - NFCHECK("Il campo %d e' duplicato!", id); -#endif - _position.add_long(pos, id); + if (_position.objptr(id)) + { + if (id > DLG_QUIT) + NFCHECK("Il campo %d e' duplicato!", id); + } + else + _position.TArray::add((TObject*)pos, id); } } @@ -1922,4 +1924,4 @@ TTimed_breakbox::TTimed_breakbox(const char * message,int seconds,int x,int y) TTimed_breakbox::~TTimed_breakbox() {} - \ No newline at end of file +