mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 11:44:55 +00:00
Fix -Wstringop-truncation issues
This commit is contained in:
@@ -645,7 +645,8 @@ int RecursiveMakeDir(const SystemChar* dir) {
|
||||
SystemChar tmp[1024];
|
||||
|
||||
/* 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);
|
||||
if (len >= std::size(tmp)) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user