diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-01 13:29:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-01 13:29:31 +0300 |
commit | 3002f81adb3cc000220ae1dde5fc817ef4046da8 (patch) | |
tree | 9007975dd336f3cf5e0068beac0c8a3d38373575 /src/mir_app | |
parent | 6b7f8c2129116382c8c67d05164110238845a1e0 (diff) |
NEWWSTR cannot be used with Utf2T
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index 13f356b2c7..36422461a6 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -420,14 +420,16 @@ static BOOL AddEventToAllMatchingUID(GCEVENT *gce) static INT_PTR CALLBACK sttEventStub(void *_param)
{
+ ptrW wszId, wszUid, wszNick, wszText, wszStatus, wszUserInfo;
+
GCEVENT gce = *(GCEVENT*)_param;
if (gce.dwFlags & GCEF_UTF8) {
- gce.pszID.w = NEWWSTR_ALLOCA(Utf2T(gce.pszID.a));
- gce.pszUID.w = NEWWSTR_ALLOCA(Utf2T(gce.pszUID.a));
- gce.pszNick.w = NEWWSTR_ALLOCA(Utf2T(gce.pszNick.a));
- gce.pszText.w = NEWWSTR_ALLOCA(Utf2T(gce.pszText.a));
- gce.pszStatus.w = NEWWSTR_ALLOCA(Utf2T(gce.pszStatus.a));
- gce.pszUserInfo.w = NEWWSTR_ALLOCA(Utf2T(gce.pszUserInfo.a));
+ gce.pszID.w = (wszId = mir_utf8decodeW(gce.pszID.a));
+ gce.pszUID.w = (wszUid = mir_utf8decodeW(gce.pszUID.a));
+ gce.pszNick.w = (wszNick = mir_utf8decodeW(gce.pszNick.a));
+ gce.pszText.w = (wszText = mir_utf8decodeW(gce.pszText.a));
+ gce.pszStatus.w = (wszStatus = mir_utf8decodeW(gce.pszStatus.a));
+ gce.pszUserInfo.w = (wszUserInfo = mir_utf8decodeW(gce.pszUserInfo.a));
gce.dwFlags &= ~GCEF_UTF8;
}
|