latticeBitParser: fix previous commit

This commit is contained in:
Gwenhael Goavec-Merou 2026-04-06 17:31:48 +02:00
parent b4bfad4b1c
commit b0ff3b517c
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ std::string LatticeBitParser::fmtIdcode(uint32_t id)
char tmp[8], buf[9] = "00000000";
std::to_chars_result conv = std::to_chars(tmp, tmp + 8, id, 16);
char *ptr = conv.ptr;
std::memcpy(buf + (8 - (ptr - tmp)), tmp, ptr - tmp);
memcpy(buf + (8 - (ptr - tmp)), tmp, ptr - tmp);
return std::string(buf, 8);
}