From 4e77117f569ef2922446086c136d9aa687ced5d5 Mon Sep 17 00:00:00 2001 From: Antonio Carlos Pantaglione Date: Mon, 30 Jun 2003 13:46:18 +0000 Subject: [PATCH] Fixed problem on adsGoTo() method when using ADT files. Borrowed from xharbour. --- harbour/contrib/rdd_ads/ads1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 0d179c4516..291c999c13 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -489,8 +489,8 @@ static ERRCODE adsGoTo( ADSAREAP pArea, ULONG ulRecNo ) { /* if it was at eof, and another station or handle added a record, it needs to GoTo or AtEof stays True. */ AdsRefreshRecord(pArea->hTable); } - else if( ulRecNo > 0 && ulRecNo <= pArea->ulRecCount ) - { + else if( ulRecNo > 0 && (pArea->iFileType==ADS_ADT || ulRecNo <= pArea->ulRecCount ) ) + { /* ADTs can have a recno greater than RecCount because it recycles deleted records !!! */ pArea->ulRecNo = ulRecNo; pArea->fBof = pArea->fEof = FALSE; ulRetVal = AdsGotoRecord( pArea->hTable, ulRecNo );