From 6cfeaa74075dea86207e254c7cfedc53c84c6802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Mon, 1 Feb 2016 14:55:51 +0100 Subject: [PATCH] 2016-02-01 14:55 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/sdf1.c ! fixed EOL decoding in DOS, OS2 and MS-Windows builds --- ChangeLog.txt | 4 ++++ src/rdd/sdf1.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index bfe63f1b76..806bcc5919 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-02-01 14:55 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rdd/sdf1.c + ! fixed EOL decoding in DOS, OS2 and MS-Windows builds + 2016-01-29 00:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/hbsocket.c ! pacified 64bit MSC warnings diff --git a/src/rdd/sdf1.c b/src/rdd/sdf1.c index 4516498e95..3ede8cbb98 100644 --- a/src/rdd/sdf1.c +++ b/src/rdd/sdf1.c @@ -120,8 +120,8 @@ static HB_ERRCODE hb_sdfReadRecord( SDFAREAP pArea ) if( pArea->nBufferRead - pArea->nBufferIndex < ( HB_SIZE ) pArea->uiEolLen + 1 && pArea->nBufferRead == pArea->nBufferSize ) { - HB_SIZE nLeft = nRead >= ( HB_SIZE ) pArea->uiRecordLen ? 0 : - pArea->nBufferRead - pArea->nBufferIndex; + HB_SIZE nLeft = pArea->nBufferRead - pArea->nBufferIndex; + if( nLeft ) memmove( pArea->pBuffer, pArea->pBuffer + pArea->nBufferIndex, nLeft );