mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-15 02:33:29 +00:00
Fix -Wstringop-truncation issues
This commit is contained in:
parent
2689533ad3
commit
e66bc80c49
@ -645,7 +645,8 @@ int RecursiveMakeDir(const SystemChar* dir) {
|
|||||||
SystemChar tmp[1024];
|
SystemChar tmp[1024];
|
||||||
|
|
||||||
/* copy path */
|
/* copy path */
|
||||||
std::strncpy(tmp, dir, std::size(tmp));
|
std::memset(tmp, 0, std::size(tmp));
|
||||||
|
std::strncpy(tmp, dir, std::size(tmp) - 1);
|
||||||
const size_t len = std::strlen(tmp);
|
const size_t len = std::strlen(tmp);
|
||||||
if (len >= std::size(tmp)) {
|
if (len >= std::size(tmp)) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user