[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 2/2] Pascal-RTL: Nicht mehr auf kaputtes fread verlassen



! Pascal-RTL: fread gibt mit LIOv2 die Anzahl der vollstaendig gelesenen
  Elemente zurueck, nicht die Anzahl Bytes

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/pas/lib/rtl/sysfile.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/pas/lib/rtl/sysfile.inc b/src/modules/pas/lib/rtl/sysfile.inc
index e357f62..5143ef8 100644
--- a/src/modules/pas/lib/rtl/sysfile.inc
+++ b/src/modules/pas/lib/rtl/sysfile.inc
@@ -37,13 +37,13 @@ begin { TODO } end;
 
 Function Do_Write(f: THandle; src: Pointer; len: TSize): TSize;
 begin 
-    Do_Write := c_fwrite(src, len, 1, f);
+    Do_Write := c_fwrite(src, 1, len, f);
 end;
 
 Function Do_Read(f: THandle; dest: Pointer; len: TSize): TSize;
 begin 
     repeat
-        Do_Read := c_fread(dest, len, 1, f);
+        Do_Read := c_fread(dest, 1, len, f);
     until (Do_Read <> 0) or (c_feof(f));
 end;
 
-- 
1.6.0.2