From ef9bbdf2e471088431f308ec5af3b46176473f08 Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Sun, 24 Feb 2013 23:28:27 -0500 Subject: [PATCH] Stuff --- mdl/m_io_sockets.pas | 3 ++- mdl/m_io_stdio.pas | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mdl/m_io_sockets.pas b/mdl/m_io_sockets.pas index 0bab4be..aaab9a6 100644 --- a/mdl/m_io_sockets.pas +++ b/mdl/m_io_sockets.pas @@ -174,7 +174,7 @@ End; Function TIOSocket.DataWaiting : Boolean; Begin - Result := (FInBufPos < FInBufEnd) or (WaitForData(0) > 0); + Result := (FInBufPos < FInBufEnd) or (WaitForData(1) > 0); End; Function TIOSocket.WriteBuf (Var Buf; Len: LongInt) : LongInt; @@ -456,6 +456,7 @@ Begin If FInBufEnd <= 0 Then Begin FInBufEnd := 0; Result := -1; + Connected := False; Exit; End; diff --git a/mdl/m_io_stdio.pas b/mdl/m_io_stdio.pas index 456da13..981a9b7 100644 --- a/mdl/m_io_stdio.pas +++ b/mdl/m_io_stdio.pas @@ -47,7 +47,7 @@ End; Function TSTDIO.DataWaiting : Boolean; Begin - Result := (FInBufPos < FInBufEnd) or (WaitForData(0) > 0); + Result := (FInBufPos < FInBufEnd) or (WaitForData(1) > 0); End; Function TSTDIO.WriteBuf (Var Buf; Len: LongInt) : LongInt;