diff --git a/src/include/recset.cpp b/src/include/recset.cpp index 48fa2db82..b0b500ca4 100755 --- a/src/include/recset.cpp +++ b/src/include/recset.cpp @@ -1615,11 +1615,17 @@ bool TISAM_recordset::move_to(TRecnotype pos) { TCursor* c = cursor(); bool ok = c != NULL && pos >= 0 && pos < c->items(); - if (ok) - { - *c = pos; - } - return ok; + if (ok) + { + *c = pos; + } + else + if (pos >= c->items()) + *c = c->items(); + else + if (pos < 0L) + *c = 0L; + return ok; } void TISAM_recordset::reset()