diff options
author | Colin Snover | 2018-02-07 00:09:36 -0600 |
---|---|---|
committer | Filippos Karapetis | 2018-12-05 01:02:27 +0200 |
commit | 54a84b900153ebbe0f7a5e812c342fa7a4b931e4 (patch) | |
tree | 43b7def1eb2120184ff2a674efdb5953fc539a12 /engines/sci | |
parent | 02586ca220ca8ddbe45dbabb5f5e8fc1ddaf9342 (diff) | |
download | scummvm-rg350-54a84b900153ebbe0f7a5e812c342fa7a4b931e4.tar.gz scummvm-rg350-54a84b900153ebbe0f7a5e812c342fa7a4b931e4.tar.bz2 scummvm-rg350-54a84b900153ebbe0f7a5e812c342fa7a4b931e4.zip |
SCI: Use Common::strlcpy instead of custom strlcpy-equivalent
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/detection.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 2befe36e29..2e5346b59f 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -697,8 +697,7 @@ ADDetectedGame SciMetaEngine::fallbackDetect(const FileMap &allFiles, const Comm return ADDetectedGame(); Common::String gameId = convertSierraGameId(sierraGameId, &s_fallbackDesc.flags, resMan); - strncpy(s_fallbackGameIdBuf, gameId.c_str(), sizeof(s_fallbackGameIdBuf) - 1); - s_fallbackGameIdBuf[sizeof(s_fallbackGameIdBuf) - 1] = 0; // Make sure string is NULL terminated + Common::strlcpy(s_fallbackGameIdBuf, gameId.c_str(), sizeof(s_fallbackGameIdBuf)); s_fallbackDesc.gameId = s_fallbackGameIdBuf; // Try to determine the game language |