diff --git a/ca/ca3700.cpp b/ca/ca3700.cpp index bdad228bb..e7cf59e21 100755 --- a/ca/ca3700.cpp +++ b/ca/ca3700.cpp @@ -1065,7 +1065,7 @@ void TPrint_rendiconto_ca_recordset::set_filter(const TPrint_rendiconto_ca_mask& //conti non riclassificati if (!_riclassificato) { - for (int i = 0; msk.id2pos(dlg_da+i) > 0; i++) + for (int i = 0; i < 4 && msk.id2pos(dlg_da+i) > 0; i++) { _daconto << msk.get(dlg_da+i); _aconto << msk.get(dlg_al+i); @@ -1073,7 +1073,7 @@ void TPrint_rendiconto_ca_recordset::set_filter(const TPrint_rendiconto_ca_mask& } else //conti riclassificati { - for (int i = 0; msk.id2pos(dlg_da+i) < 41; i++) //***41 andrebbe sostituito con una condizione + seria + for (int i = 0; i < 4 && msk.id2pos(dlg_da+i) > 0; i++) { _da_conto_riclas << msk.get(dlg_da+i); _a_conto_riclas << msk.get(dlg_al+i);