Browse Source

+ Hopefully fixed some issues with int64 seek

michael 23 years ago
parent
commit
88e2117b95
1 changed files with 8 additions and 5 deletions
  1. 8 5
      fcl/inc/streams.inc

+ 8 - 5
fcl/inc/streams.inc

@@ -19,13 +19,13 @@
   function TStream.GetPosition: Int64;
   function TStream.GetPosition: Int64;
 
 
     begin
     begin
-       Result:=Seek(0,soFromCurrent);
+       Result:=Seek(0,soCurrent);
     end;
     end;
 
 
   procedure TStream.SetPosition(Pos: Int64);
   procedure TStream.SetPosition(Pos: Int64);
 
 
     begin
     begin
-       Seek(pos,soFromBeginning);
+       Seek(pos,soBeginning);
     end;
     end;
 
 
   procedure TStream.SetSize64(NewSize: Int64);
   procedure TStream.SetSize64(NewSize: Int64);
@@ -42,8 +42,8 @@
 
 
     begin
     begin
        p:=GetPosition;
        p:=GetPosition;
-       GetSize:=Seek(0,soFromEnd);
-       Seek(p,soFromBeginning);
+       GetSize:=Seek(0,soEnd);
+       Seek(p,soBeginning);
     end;
     end;
 
 
   procedure TStream.SetSize(NewSize: Longint);
   procedure TStream.SetSize(NewSize: Longint);
@@ -784,7 +784,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.8  2002-10-22 09:38:39  michael
+  Revision 1.9  2002-12-18 15:51:52  michael
+  + Hopefully fixed some issues with int64 seek
+
+  Revision 1.8  2002/10/22 09:38:39  michael
   + Fixed TmemoryStream.LoadFromStream, reported by Mattias Gaertner
   + Fixed TmemoryStream.LoadFromStream, reported by Mattias Gaertner
 
 
   Revision 1.7  2002/09/07 15:15:25  peter
   Revision 1.7  2002/09/07 15:15:25  peter