Core: Append single character to stream as character, not as a string
This commit is contained in:
1 parent
06b46ba203
commit
e47b96af3e
70 files changed
+432
-424
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user