[cooja] plugins/analyzers/PacketAnalyzer: Fixed integer assembly from bytes in getInt() method

This commit is contained in:
Enrico Joerns 2014-06-19 04:22:31 +02:00
parent 9f70a6f327
commit a88328c8db

View File

@ -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;
}