mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 23:16:41 +00:00
Strncpy doesn't terminate correctly, switch to truncate_cpy.
This commit is contained in:
parent
4b46bb4ecf
commit
083f7ff280
@ -22,6 +22,7 @@
|
||||
#include "base/stringutil.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
@ -312,7 +313,7 @@ public:
|
||||
}
|
||||
|
||||
char moduleName[29] = {0};
|
||||
strncpy(moduleName, nm.name, ARRAY_SIZE(nm.name));
|
||||
truncate_cpy(moduleName, nm.name);
|
||||
if (memoryBlockAddr != 0) {
|
||||
g_symbolMap->AddModule(moduleName, memoryBlockAddr, memoryBlockSize);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user