From 78292e5d188eb46ec6bd59c5c0e53679a785bc8d Mon Sep 17 00:00:00 2001 From: magumagu Date: Wed, 23 Apr 2014 14:51:59 -0700 Subject: [PATCH] Movie: don't use "hh" scanf modifier. Attempting to use it with Visual Studio is a good way to corrupt the stack. --- Source/Core/Core/Movie.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index bc13a76be6..df33528de4 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -1192,11 +1192,11 @@ void GetSettings() if (!Core::g_CoreStartupParameter.bWii) g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA); bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD; - u8 tmp[21]; + unsigned int tmp; for (int i = 0; i < 20; ++i) { - sscanf(&scm_rev_git_str[2 * i], "%02hhx", &tmp[i]); - revision[i] = tmp[i]; + sscanf(&scm_rev_git_str[2 * i], "%02x", &tmp); + revision[i] = tmp; } }