diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-18 00:00:39 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-18 00:00:39 +0100 |
commit | b0bef05111a95a4cce6250d2b79e2aa5baa6dd98 (patch) | |
tree | 5bdc39717bebfc437adf8683405d58d97e1f43b2 /NorthstarDLL/rpakfilesystem.cpp | |
parent | 6ae30c9b15fcc200c7b642016e7adbfdf9b979f4 (diff) | |
download | NorthstarLauncher-b0bef05111a95a4cce6250d2b79e2aa5baa6dd98.tar.gz NorthstarLauncher-b0bef05111a95a4cce6250d2b79e2aa5baa6dd98.zip |
use modular ServerPresence system for registering servers
Diffstat (limited to 'NorthstarDLL/rpakfilesystem.cpp')
-rw-r--r-- | NorthstarDLL/rpakfilesystem.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/NorthstarDLL/rpakfilesystem.cpp b/NorthstarDLL/rpakfilesystem.cpp index 4d35aa8e..28d8b101 100644 --- a/NorthstarDLL/rpakfilesystem.cpp +++ b/NorthstarDLL/rpakfilesystem.cpp @@ -189,8 +189,7 @@ void*, , (const char* pPath, void* a2)) // need to allocate a new string for this
std::string newPath = (modFile->second.m_pOwningMod->m_ModDirectory / "mod" / modFile->second.m_Path).string();
allocatedNewPath = new char[newPath.size() + 1];
- strncpy(allocatedNewPath, newPath.c_str(), newPath.size());
- allocatedNewPath[newPath.size()] = '\0';
+ strncpy_s(allocatedNewPath, newPath.size() + 1, newPath.c_str(), newPath.size());
pPath = allocatedNewPath;
}
}
|