Browse Source

* TCFileStream.Seek should return the new position

git-svn-id: trunk@6969 -
florian 18 years ago
parent
commit
66a6764d8a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      compiler/cstreams.pas

+ 5 - 2
compiler/cstreams.pas

@@ -417,7 +417,10 @@ begin
   {$I-}
   {$I-}
    case Origin of
    case Origin of
      soFromBeginning :
      soFromBeginning :
-       System.Seek(FHandle,Offset);
+       begin
+         System.Seek(FHandle,Offset);
+         l:=Offset;
+       end;
      soFromCurrent :
      soFromCurrent :
        begin
        begin
          l:=System.FilePos(FHandle);
          l:=System.FilePos(FHandle);
@@ -435,7 +438,7 @@ begin
    end;
    end;
   {$I+}
   {$I+}
   CStreamError:=IOResult;
   CStreamError:=IOResult;
-  Result:=CStreamError;
+  Result:=l;
 end;
 end;