From 49ba387f63b5f4251954cc553e980709c9823bc5 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:02:00 +0000 Subject: Utilisateur : Fcolin Date : 10/02/06 Heure : 15:31 Archivé dans $/CSharp/Ivy/Ivy Commentaire: endof stream throw exception (vss 10) --- CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CSharp/Ivy/IvyPPC') diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs index 9d6d828..ab1de39 100644 --- a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs +++ b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs @@ -135,7 +135,8 @@ namespace IvyBus do { read = input.Read(); - if (read < 0) break; + if (read < 0) + throw new EndOfStreamException(); digit = (char)read; if (Char.IsDigit(digit)) ret = (ushort)(ret * 10 + (digit - 0x30)); @@ -151,7 +152,8 @@ namespace IvyBus do { read = input.Read(); - if (read < 0) break; + if (read < 0) + throw new EndOfStreamException(); car = (char)read; if (car != sep ) str.Append(car); } while (car != sep); -- cgit v1.1