2015-04-29 update 1 Fix the bug in AddressFormater again
This commit is contained in:
@@ -15,7 +15,8 @@ namespace ModBus.Net
|
|||||||
{
|
{
|
||||||
public override string FormatAddress(string area, int address)
|
public override string FormatAddress(string area, int address)
|
||||||
{
|
{
|
||||||
if (area.ToUpper().Substring(0,2) == "DB")
|
if (area.Length > 1 &&
|
||||||
|
area.ToUpper().Substring(0,2) == "DB")
|
||||||
{
|
{
|
||||||
return area.ToUpper() + "." + "DB" + address;
|
return area.ToUpper() + "." + "DB" + address;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user