summaryrefslogtreecommitdiff
path: root/CSharp
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
index d44bd38..8776dd7 100644
--- a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
+++ b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
@@ -201,7 +201,8 @@ namespace IvyBus
case MessageType.Msg:
// a bad protocol implementation in C add a delimiter to the end of each arg
// we must remove a delimiter to the end
- msgData = msgData.Remove(msgData.Length - 1,1);
+ if ( msgData.Length > 0 )
+ msgData = msgData.Remove(msgData.Length - 1,1);
receiver.TokenMsg(msgId, msgData.Split( ARG_END ));
break;