Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmclean committed Dec 27, 2017
1 parent a7ab5ee commit ad6bf6f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ public Address parseAddress(String addressString) throws PlcException {
}
MemoryArea memoryArea = MemoryArea.valueOf(addressMatcher.group("memoryArea"));
int byteOffset = Integer.valueOf(addressMatcher.group("byteOffset"));
if (addressMatcher.groupCount() >= 4) {
int bitOffset = Integer.valueOf(addressMatcher.group("bitOffset"));
return new S7BitAddress(memoryArea, (short) byteOffset, (byte) bitOffset);
String bitOffset = addressMatcher.group("bitOffset");
if (bitOffset != null) {
return new S7BitAddress(memoryArea, (short) byteOffset, Byte.valueOf(bitOffset));
}
return new S7Address(memoryArea, (short) byteOffset);
}
Expand Down

0 comments on commit ad6bf6f

Please sign in to comment.