You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/10/10 14:37:59 UTC

[incubator-plc4x] 01/02: PLC4X-59 - [S7] Reading a UDINT with value 0x00000000 and non positive floating point values does not work - Fixed a copy+paste error (I hope)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit 6a3e8c5fabba1ad55942ada8879b8563ab594d55
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 10 16:34:53 2018 +0200

    PLC4X-59 - [S7] Reading a UDINT with value 0x00000000 and non positive floating point values does not work
    - Fixed a copy+paste error (I hope)
---
 .../org/apache/plc4x/java/base/messages/items/DefaultLongFieldItem.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/items/DefaultLongFieldItem.java b/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/items/DefaultLongFieldItem.java
index 2fb238c..ff2e5e0 100644
--- a/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/items/DefaultLongFieldItem.java
+++ b/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/items/DefaultLongFieldItem.java
@@ -106,7 +106,7 @@ public class DefaultLongFieldItem extends FieldItem<Long> {
 
     @Override
     public Long getLong(int index) {
-        if (isValidFloat(index)) {
+        if (isValidLong(index)) {
             return getValue(index);
         }
         return null;