diff --git a/ca/ca2500.cpp b/ca/ca2500.cpp index 8594fd2ed..6e5134478 100644 --- a/ca/ca2500.cpp +++ b/ca/ca2500.cpp @@ -197,7 +197,7 @@ bool TBoard_app::esporta(const TString& DSN, TIsam_handle lf, const TDate& datef } else { - for (bool go = dbfset.move_first(); go&& !p.iscancelled(); go = dbfset.move_next()) + for (bool go = dbfset.move_first(); go && !p.iscancelled(); go = dbfset.move_next()) { int cmp = 1; @@ -205,7 +205,7 @@ bool TBoard_app::esporta(const TString& DSN, TIsam_handle lf, const TDate& datef if (!sqlset.eof()) { cmp = sqlset.compare_key(dbfset); - while (cmp > 0) + while (!sqlset.eof() && cmp > 0) { sqlset.remove_rec(dbfset); sqlset.move_next();