aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2018-02-07 00:09:36 -0600
committerFilippos Karapetis2018-12-05 01:02:27 +0200
commit54a84b900153ebbe0f7a5e812c342fa7a4b931e4 (patch)
tree43b7def1eb2120184ff2a674efdb5953fc539a12 /engines/sci
parent02586ca220ca8ddbe45dbabb5f5e8fc1ddaf9342 (diff)
downloadscummvm-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.cpp3
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