mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
[cooja] plugins/analyzers/PacketAnalyzer: Fixed integer assembly from bytes in getInt() method
This commit is contained in:
parent
9f70a6f327
commit
a88328c8db
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user