summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs6
1 files changed, 4 insertions, 2 deletions
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);