diff --git a/src/include/recset.cpp b/src/include/recset.cpp index af67facbc..14788ee40 100755 --- a/src/include/recset.cpp +++ b/src/include/recset.cpp @@ -1606,11 +1606,10 @@ unsigned int TISAM_recordset::columns() const bool TISAM_recordset::move_to(TRecnotype pos) { TCursor* c = cursor(); - bool ok = c != NULL && pos >= 0; + bool ok = c != NULL && pos >= 0 && pos < c->items(); if (ok) { *c = pos; - ok = pos >= 0 && pos < c->items(); } return ok; }