From e47b96af3e3a41eae71e3e3da7eeee8bd3de86bc Mon Sep 17 00:00:00 2001 From: Spp- Date: Fri, 29 Jul 2011 14:18:28 +0200 Subject: Core: Append single character to stream as character, not as a string --- src/server/game/Tools/PlayerDump.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/game/Tools/PlayerDump.cpp') diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 4a1c525167b..86fb5cce425 100755 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -91,7 +91,7 @@ bool findnth(std::string &str, int n, std::string::size_type &s, std::string::si do { - e = str.find("'", s); + e = str.find('\'', s); if (e == std::string::npos) return false; } while (str[e-1] == '\\'); @@ -100,7 +100,7 @@ bool findnth(std::string &str, int n, std::string::size_type &s, std::string::si do { s = e+4; - e = str.find("'", s); + e = str.find('\'', s); if (e == std::string::npos) return false; } while (str[e-1] == '\\'); } @@ -202,14 +202,14 @@ std::string CreateDumpString(char const* tableName, QueryResult result) Field *fields = result->Fetch(); for (uint32 i = 0; i < result->GetFieldCount(); ++i) { - if (i == 0) ss << "'"; + if (i == 0) ss << '\''; else ss << ", '"; std::string s = fields[i].GetString(); CharacterDatabase.EscapeString(s); ss << s; - ss << "'"; + ss << '\''; } ss << ");"; return ss.str(); @@ -218,7 +218,7 @@ std::string CreateDumpString(char const* tableName, QueryResult result) std::string PlayerDumpWriter::GenerateWhereStr(char const* field, uint32 guid) { std::ostringstream wherestr; - wherestr << field << " = '" << guid << "'"; + wherestr << field << " = '" << guid << '\''; return wherestr.str(); } -- cgit v1.2.3