소스 검색

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

git-svn-id: trunk@2156 -
Jonas Maebe 19 년 전
부모
커밋
a67f42a3e7
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      rtl/inc/text.inc

+ 8 - 3
rtl/inc/text.inc

@@ -1082,9 +1082,14 @@ Begin
       exit;
      ReadNumeric(f,hs);
    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;