From a88328c8db9f2e1f798c44e8c70445153d150615 Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Thu, 19 Jun 2014 04:22:31 +0200 Subject: [PATCH] [cooja] plugins/analyzers/PacketAnalyzer: Fixed integer assembly from bytes in getInt() method --- .../org/contikios/cooja/plugins/analyzers/PacketAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cooja/java/org/contikios/cooja/plugins/analyzers/PacketAnalyzer.java b/tools/cooja/java/org/contikios/cooja/plugins/analyzers/PacketAnalyzer.java index 3be8a8284..7f4002960 100644 --- a/tools/cooja/java/org/contikios/cooja/plugins/analyzers/PacketAnalyzer.java +++ b/tools/cooja/java/org/contikios/cooja/plugins/analyzers/PacketAnalyzer.java @@ -55,7 +55,7 @@ public abstract class PacketAnalyzer { public int getInt(int index, int size) { int value = 0; for (int i = 0; i < size; i++) { - value = (value << 8) + get(index + i); + value = (value << 8) + (get(index + i) & 0xFF); } return value; }