From ddfedaa17e72905068f742127d93289a03e294a0 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 8 Jun 2018 10:22:42 +0200 Subject: [PATCH] Typo in Exception string --- S7.Net/PLCHelpers.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/S7.Net/PLCHelpers.cs b/S7.Net/PLCHelpers.cs index 7525ff2..ab59d2c 100644 --- a/S7.Net/PLCHelpers.cs +++ b/S7.Net/PLCHelpers.cs @@ -154,7 +154,7 @@ namespace S7.Net varType = VarType.Counter; return; default: - throw new InvalidAddressException(string.Format("{0} is not av valid address", address.Substring(0, 1))); + throw new InvalidAddressException(string.Format("{0} is not a valid address", address.Substring(0, 1))); } string txt2 = address.Substring(1); @@ -248,7 +248,7 @@ namespace S7.Net /// private object ParseBytes(VarType varType, byte[] bytes, int varCount, byte bitAdr = 0) { - if (bytes == null) + if (bytes == null || bytes.Length == 0) return null; switch (varType) @@ -352,10 +352,10 @@ namespace S7.Net } - /// - /// Sets the to and to . - /// - public void ClearLastError() + /// + /// Sets the to and to . + /// + public void ClearLastError() { LastErrorCode = ErrorCode.NoError; LastErrorString = string.Empty;