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

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


The following commit(s) were added to refs/heads/feature/Beckhoff_ADS_protocol 
by this push:
     new 013421c  fixed wrong masking of integer as we masked to much
013421c is described below

commit 013421c050cb145e7082d611a1c1168a9f14c1fa
Author: Sebastian Rühl <sru...@apache.org>
AuthorDate: Fri Feb 2 10:13:58 2018 +0100

    fixed wrong masking of integer as we masked to much
---
 .../main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
index 767ae7a..5d30f96 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
@@ -43,7 +43,7 @@ public class AMSPort extends ByteValue {
     }
 
     public static AMSPort of(int port) {
-        return new AMSPort(ByteBuffer.allocate(NUM_BYTES).put((byte) (port & 
0xff)).array());
+        return new AMSPort(ByteBuffer.allocate(NUM_BYTES).put((byte) (port & 
0xffff)).array());
     }
 
     public static AMSPort of(String port) {

-- 
To stop receiving notification emails like this one, please contact
sru...@apache.org.

Reply via email to