Browse Source

* also return 0 when reading an unsigned integer at the end of a file

git-svn-id: trunk@2156 -
Jonas Maebe 19 years ago
parent
commit
a67f42a3e7
1 changed files with 8 additions and 3 deletions
  1. 8 3
      rtl/inc/text.inc

+ 8 - 3
rtl/inc/text.inc

@@ -1082,9 +1082,14 @@ Begin
       exit;
       exit;
      ReadNumeric(f,hs);
      ReadNumeric(f,hs);
    end;
    end;
-  val(hs,u,code);
-  If code<>0 Then
-   InOutRes:=106;
+   if (hs = '') then
+    u := 0
+   else
+    begin
+      val(hs,u,code);
+      If code<>0 Then
+        InOutRes:=106;
+    end;
 End;
 End;