From 7b3115e4de8efdcb9b7d6a25f6ca2fdf22bd155c Mon Sep 17 00:00:00 2001 From: sum2012 Date: Tue, 27 Jan 2015 19:54:22 +0800 Subject: [PATCH] Create as UTF-8 format of new cwcheat file Fix #4300 --- Core/CwCheat.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/CwCheat.cpp b/Core/CwCheat.cpp index 77e8c8bf42..c7c6bed167 100644 --- a/Core/CwCheat.cpp +++ b/Core/CwCheat.cpp @@ -13,6 +13,8 @@ #include "util/text/utf8.h" #endif +using namespace std; + static int CheatEvent = -1; std::string gameTitle; std::string activeCheatFile; @@ -39,7 +41,11 @@ static void __CheatStart() { File::CreateFullPath(GetSysDirectory(DIRECTORY_CHEATS)); if (!File::Exists(activeCheatFile)) { - File::CreateEmptyFile(activeCheatFile); + ofstream myCheatFile; + myCheatFile.open(activeCheatFile); + myCheatFile << "\xEF\xBB\xBF"; + myCheatFile.close(); + } cheatEngine = new CWCheatEngine();