Commit c5fde96c authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

error null на конце string после fromUnicode

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64820 954022d7-b5bf-4e40-9824-e11837661b57
parent 6ce518ee
......@@ -65,8 +65,10 @@ namespace NSUnicodeConverter
const UChar* pUCharLimit = pUCharStart + nUCharLength;
sRes.resize(nUCharLength * ucnv_getMaxCharSize(conv));// UTF-16 uses 2 code-points per char
char *sResStart = &sRes[0];
const char *sResLimit = sResStart + sRes.size();
ucnv_fromUnicode(conv, &sResStart, sResLimit, &pUCharStart, pUCharLimit, NULL, TRUE, &status);
char *sResCur = sResStart;
const char *sResLimit = sResCur + sRes.size();
ucnv_fromUnicode(conv, &sResCur, sResLimit, &pUCharStart, pUCharLimit, NULL, TRUE, &status);
sRes.resize(sResCur - sResStart);
}
ucnv_close(conv);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment