aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/detection.cpp')
-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