From fb1a3149faa130bf5b847ea098b28c07a30ff328 Mon Sep 17 00:00:00 2001 From: Kentucky Compass Date: Mon, 30 Dec 2013 21:48:36 -0800 Subject: [PATCH] Don't use strstr for single character search terms --- Core/Util/GameManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Util/GameManager.cpp b/Core/Util/GameManager.cpp index 83b2c7fd7b..51d79e8b48 100644 --- a/Core/Util/GameManager.cpp +++ b/Core/Util/GameManager.cpp @@ -199,7 +199,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) { File::CreateFullPath(outFilename.c_str()); createdDirs.insert(outFilename); } - if (!isDir && strstr(fn, "/") != 0) { + if (!isDir && strchr(fn, '/') != 0) { struct zip_stat zstat; if (zip_stat_index(z, i, 0, &zstat) >= 0) { allBytes += zstat.size; @@ -213,7 +213,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) { const char *fn = zip_get_name(z, i, 0); // Note that we do NOT write files that are not in a directory, to avoid random // README files etc. - if (strstr(fn, "/") != 0) { + if (strchr(fn, '/') != 0) { struct zip_stat zstat; zip_stat_index(z, i, 0, &zstat); size_t size = zstat.size;