mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 22:38:27 +08:00
Typo in Exception string
This commit is contained in:
@@ -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
|
||||
/// <returns></returns>
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sets the <see cref="LastErrorCode"/> to <see cref="ErrorCode.NoError"/> and <see cref="LastErrorString"/> to <see cref="string.Empty"/>.
|
||||
/// </summary>
|
||||
public void ClearLastError()
|
||||
/// <summary>
|
||||
/// Sets the <see cref="LastErrorCode"/> to <see cref="ErrorCode.NoError"/> and <see cref="LastErrorString"/> to <see cref="string.Empty"/>.
|
||||
/// </summary>
|
||||
public void ClearLastError()
|
||||
{
|
||||
LastErrorCode = ErrorCode.NoError;
|
||||
LastErrorString = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user