summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA/src/Mra_functions.cpp')
-rw-r--r--protocols/MRA/src/Mra_functions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 22def539cd..56d22b66a5 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -1455,7 +1455,7 @@ static const size_t dwXMLSymbolsCount[] = { sizeof(TCHAR), sizeof(TCHAR), sizeof
//Decode XML coded string. The function translate special xml code into standard characters.
CMStringW DecodeXML(const CMStringW &lptszMessage)
{
- CMStringW ret('\0', lptszMessage.GetLength());
+ CMStringW ret('\0', (lptszMessage.GetLength() * 4));
ReplaceInBuff((void*)lptszMessage.GetString(), lptszMessage.GetLength()*sizeof(TCHAR), SIZEOF(lpszXMLTags), (LPVOID*)lpszXMLTags, (size_t*)dwXMLTagsCount, (LPVOID*)lpszXMLSymbols, (size_t*)dwXMLSymbolsCount, ret);
return ret;
}
@@ -1463,7 +1463,7 @@ CMStringW DecodeXML(const CMStringW &lptszMessage)
//Encode XML coded string. The function translate special saved xml characters into special characters.
CMStringW EncodeXML(const CMStringW &lptszMessage)
{
- CMStringW ret;
+ CMStringW ret('\0', (lptszMessage.GetLength() * 4));
ReplaceInBuff((void*)lptszMessage.GetString(), lptszMessage.GetLength()*sizeof(TCHAR), SIZEOF(lpszXMLTags), (LPVOID*)lpszXMLSymbols, (size_t*)dwXMLSymbolsCount, (LPVOID*)lpszXMLTags, (size_t*)dwXMLTagsCount, ret);
return ret;
}