diff --git a/src/inet/common/MemoryInputStream.h b/src/inet/common/MemoryInputStream.h index 27997392022..971e0200a49 100644 --- a/src/inet/common/MemoryInputStream.h +++ b/src/inet/common/MemoryInputStream.h @@ -437,10 +437,7 @@ class INET_API MemoryInputStream * byte order and MSB to LSB bit order. */ MacAddress readMacAddress() { - MacAddress address; - for (int i = 0; i < MAC_ADDRESS_SIZE; i++) - address.setAddressByte(i, readByte()); - return address; + return MacAddress(readUint48Be()); } /**