SCI: Use Common::strlcpy instead of custom strlcpy-equivalent

This commit is contained in:
Colin Snover 2018-02-07 00:09:36 -06:00 committed by Filippos Karapetis
parent 02586ca220
commit 54a84b9001

View file

@ -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