DEADSOFTWARE

added license info
[d2df-sdl.git] / src / shared / xstreams.pas
index 270d292e88bc80464d699d34951672e4bfa1b4e4..17a575b8a328489783cc230aa523bdda0bc62359 100644 (file)
@@ -1,3 +1,18 @@
+(* Copyright (C)  DooM 2D:Forever Developers
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *)
 // special stream classes
 {$MODE DELPHI}
 {$R+}
@@ -362,7 +377,7 @@ begin
     //writeln('  reading ', rd, ' bytes...');
     rr := readBuf(buf, rd);
     //writeln('  got ', rr, ' bytes; fPos=', fPos, '; fSkipToPos=', fSkipToPos);
-    if rd <= 0 then raise XStreamError.Create('seek error');
+    if rr <= 0 then raise XStreamError.Create('seek error');
   end;
   //writeln('  pos: fPos=', fPos, '; fSkipToPos=', fSkipToPos);
   fSkipToPos := -1;