Avoid GCC's stringop-truncation warning

Not copying the termination character here is wanted. Just use
`std::memcpy` to avoid it as the special behavior of `std::strncpy` is not
needed here anyways.
This commit is contained in:
Martchus 2023-10-31 19:36:01 +01:00
parent 0827002183
commit ef0ab3d8c3
1 changed files with 1 additions and 1 deletions

View File

@ -1172,7 +1172,7 @@ void Id3v2Frame::makeLegacyPicture(
} else {
imageFormat = "UND";
}
std::strncpy(++offset, imageFormat, 3);
std::memcpy(++offset, imageFormat, 3);
// write picture type
*(offset += 3) = static_cast<char>(typeInfo);