From 5b3cee731ff6533c3f2097b2eec74971e456675f Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 24 Aug 2000 22:29:37 +0000 Subject: [PATCH] * Line reader now reports a read line after a single #10 at the end of the current input buffer --- fcl/inc/asyncio.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fcl/inc/asyncio.pp b/fcl/inc/asyncio.pp index aa98178d5e..dfa06012ef 100644 --- a/fcl/inc/asyncio.pp +++ b/fcl/inc/asyncio.pp @@ -260,7 +260,7 @@ begin CurBytesInBuffer := FBytesInBuffer; - while i <= CurBytesInBuffer - 2 do + while i <= CurBytesInBuffer - 1 do begin if (RealBuffer[i] = #13) or (RealBuffer[i] = #10) then begin @@ -269,7 +269,8 @@ begin if LineLength > 0 then Move(RealBuffer[LastEndOfLine], line[1], LineLength); - if (RealBuffer[i] = #13) and (RealBuffer[i + 1] = #10) then + if (i < CurBytesInBuffer - 1) and (RealBuffer[i] = #13) and + (RealBuffer[i + 1] = #10) then Inc(i); LastEndOfLine := i + 1; @@ -512,7 +513,11 @@ end. { $Log$ - Revision 1.2 2000-07-13 11:32:58 michael + Revision 1.3 2000-08-24 22:29:37 sg + * Line reader now reports a read line after a single #10 at the end of the + current input buffer + + Revision 1.2 2000/07/13 11:32:58 michael + removed logs }