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:
parent
0827002183
commit
ef0ab3d8c3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue