summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-18 08:57:17 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-18 08:57:17 +0000
commitdcd85d0ceddfb435546875f48f39bf09fba090f5 (patch)
tree5f0f200695b225a89de3bf56ddd02181afc46fbf
parent2c8dfc4b225ce028d1354f42040bd9eefb5e445b (diff)
downloadfpc-dcd85d0ceddfb435546875f48f39bf09fba090f5.tar.gz
* Patch from maillist for read() on a file with only a few numerical digits
in them and no crlf git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--rtl/inc/text.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/rtl/inc/text.inc b/rtl/inc/text.inc
index a8752244a2..a1fd7553cd 100644
--- a/rtl/inc/text.inc
+++ b/rtl/inc/text.inc
@@ -755,6 +755,7 @@ End;
Function NextChar(var f:Text;var s:string):Boolean;
begin
+ NextChar:=false;
if (TextRec(f).BufPos<TextRec(f).BufEnd) then
if not (CtrlZMarksEOF) or (TextRec(f).Bufptr^[TextRec(f).BufPos]<>#26) then
begin
@@ -767,9 +768,7 @@ begin
If TextRec(f).BufPos>=TextRec(f).BufEnd Then
FileFunc(TextRec(f).InOutFunc)(TextRec(f));
NextChar:=true;
- end
- else
- NextChar:=false;
+ end;
end;