mirror of https://github.com/AxioDL/metaforce.git
CMemoryCardSys: Fix -Wstringop-truncation issue
This commit is contained in:
parent
ab16eb5d07
commit
53fb23fc17
|
@ -218,7 +218,8 @@ void CMemoryCardSys::CCardFileInfo::BuildCardBuffer() {
|
||||||
CMemoryOutStream w(x104_cardBuffer.data(), x104_cardBuffer.size());
|
CMemoryOutStream w(x104_cardBuffer.data(), x104_cardBuffer.size());
|
||||||
w.writeUint32Big(0);
|
w.writeUint32Big(0);
|
||||||
char comment[64];
|
char comment[64];
|
||||||
strncpy(comment, x28_comment.data(), 64);
|
std::memset(comment, 0, std::size(comment));
|
||||||
|
std::strncpy(comment, x28_comment.data(), std::size(comment) - 1);
|
||||||
w.writeBytes(comment, 64);
|
w.writeBytes(comment, 64);
|
||||||
WriteBannerData(w);
|
WriteBannerData(w);
|
||||||
WriteIconData(w);
|
WriteIconData(w);
|
||||||
|
|
Loading…
Reference in New Issue