escape strings before applying FuzzyString

This commit is contained in:
H-M-H 2016-09-03 18:28:11 +02:00
parent f3f6338ed1
commit 1a311585be

View file

@ -262,6 +262,7 @@ void CSqlScore::MapVote(int ClientID, const char* MapName)
Tmp->m_ClientID = ClientID;
Tmp->m_RequestedMap = MapName;
str_copy(Tmp->m_aFuzzyMap, MapName, sizeof(Tmp->m_aFuzzyMap));
sqlstr::ClearString(Tmp->m_aFuzzyMap, sizeof(Tmp->m_aFuzzyMap));
sqlstr::FuzzyString(Tmp->m_aFuzzyMap);
void *VoteThread = thread_init(ExecSqlFunc, new CSqlExecData(MapVoteThread, Tmp));
@ -357,6 +358,7 @@ void CSqlScore::MapInfo(int ClientID, const char* MapName)
Tmp->m_ClientID = ClientID;
Tmp->m_RequestedMap = MapName;
str_copy(Tmp->m_aFuzzyMap, MapName, sizeof(Tmp->m_aFuzzyMap));
sqlstr::ClearString(Tmp->m_aFuzzyMap, sizeof(Tmp->m_aFuzzyMap));
sqlstr::FuzzyString(Tmp->m_aFuzzyMap);
void *InfoThread = thread_init(ExecSqlFunc, new CSqlExecData(MapInfoThread, Tmp));