2015-09-03 14:00 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/rdd/sdf1.c
    ! use hb_fileResult() to process hb_fileRead() results - it fixes
      problem reported by Viktor.
This commit is contained in:
Przemysław Czerpak
2015-09-03 14:00:03 +02:00
parent 8c5c40d8b5
commit 1d300dddfe
2 changed files with 11 additions and 7 deletions

View File

@@ -10,6 +10,11 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2015-09-03 14:00 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/sdf1.c
! use hb_fileResult() to process hb_fileRead() results - it fixes
problem reported by Viktor.
2015-09-02 22:53 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
! typos in prev ChgLog entry

View File

@@ -97,14 +97,13 @@ static void hb_sdfClearRecordBuffer( SDFAREAP pArea )
static HB_ERRCODE hb_sdfReadRecord( SDFAREAP pArea )
{
HB_USHORT uiRead, uiToRead, uiEolPos;
HB_SIZE nRead;
HB_TRACE( HB_TR_DEBUG, ( "hb_sdfReadRecord(%p)", pArea ) );
uiToRead = pArea->uiRecordLen + pArea->uiEolLen + 2;
nRead = hb_fileReadAt( pArea->pFile, pArea->pRecord, uiToRead,
pArea->nRecordOffset );
uiRead = ( HB_USHORT ) ( nRead == ( HB_SIZE ) FS_ERROR ? 0 : nRead );
uiRead = ( HB_USHORT ) hb_fileResult(
hb_fileReadAt( pArea->pFile, pArea->pRecord, uiToRead,
pArea->nRecordOffset ) );
if( uiRead > 0 && uiRead < uiToRead && pArea->pRecord[ uiRead - 1 ] == '\032' )
--uiRead;
@@ -168,9 +167,9 @@ static HB_ERRCODE hb_sdfNextRecord( SDFAREAP pArea )
do
{
HB_SIZE nRead = hb_fileReadAt( pArea->pFile, pArea->pRecord + uiRest,
uiToRead - uiRest, ulOffset + uiRest ) + uiRest;
uiRead = ( HB_USHORT ) ( nRead == ( HB_SIZE ) FS_ERROR ? 0 : nRead );
uiRead = ( HB_USHORT ) hb_fileResult(
hb_fileReadAt( pArea->pFile, pArea->pRecord + uiRest,
uiToRead - uiRest, ulOffset + uiRest ) ) + uiRest;
if( uiRead > 0 && uiRead < uiToRead &&
pArea->pRecord[ uiRead - 1 ] == '\032' )
--uiRead;