From 6796d6d6c2b02ca5e8d9db29349f9582efcc94ee Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Tue, 12 Mar 2002 08:35:24 +0000 Subject: [PATCH] 2002-03-12 11:40 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 5 +++++ harbour/source/rtl/dbsdf.prg | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c7de7952fb..293c0764b3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,11 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ + + * source/compiler/harbour.sly + ! Correted minor bug in GetA + +2002-03-13 18:53 UTC+0300 Alexander Kresin * source/pp/ppcomp.c * bug fixed, related to 'ENDTEXT' position diff --git a/harbour/source/rtl/dbsdf.prg b/harbour/source/rtl/dbsdf.prg index 235d13ad06..e85c6f8164 100644 --- a/harbour/source/rtl/dbsdf.prg +++ b/harbour/source/rtl/dbsdf.prg @@ -221,13 +221,13 @@ STATIC FUNCTION ExportFixed( handle, xField ) RETURN .T. STATIC FUNCTION ImportFixed( handle, index, aStruct ) - LOCAL cBuffer := Space(aStruct[ index,3 ]), pos, res := .T. + LOCAL cBuffer := Space(aStruct[ index,3 ]), pos, res := .T., nRead LOCAL vres - FREAD( handle, @cBuffer, aStruct[ index,3 ] ) - IF ( pos := At( CHR(13),cBuffer ) ) > 0 + nRead := FREAD( handle, @cBuffer, aStruct[ index,3 ] ) + IF ( pos := At( CHR(13),cBuffer ) ) > 0 .AND. pos <= nRead res := .F. - FSEEK( handle, -( aStruct[ index,3 ] - pos + 1 ), FS_RELATIVE ) + FSEEK( handle, -( nRead - pos + 1 ), FS_RELATIVE ) IF pos > 1 cBuffer := Left( cBuffer,pos-1 ) ELSE