diff --git a/src/ams/hdlc.cpp b/src/ams/hdlc.cpp index 618ce8b0..a609683d 100644 --- a/src/ams/hdlc.cpp +++ b/src/ams/hdlc.cpp @@ -268,7 +268,7 @@ int HDLC_validate(const uint8_t* d, int length, HDLCConfig* config, CosemDateTim } else if(dateTime->base.type == CosemTypeDateTime) { memcpy(timestamp, ptr, dateTime->base.length); } else if(dateTime->base.type == 0x0C) { // Kamstrup bug... - memcpy(timestamp, ptr, 0x13); + memcpy(timestamp, ptr, 13); ptr += 13; } else { return HDLC_TIMESTAMP_UNKNOWN;