diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-23 19:24:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-23 19:24:04 +0000 |
commit | a4bd1d2df4f0599c56b4ce1f0f06a8f7e62331a0 (patch) | |
tree | df8ec4f7ce4979c14642f65743750f777293f226 /plugins/NewAwaySysMod/src/Services.cpp | |
parent | 67960e0354247c38f995606d3098614fc9bd46d3 (diff) |
- strong menu items prototypes in NAS;
- memory corruption issue fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@8234 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod/src/Services.cpp')
-rw-r--r-- | plugins/NewAwaySysMod/src/Services.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp index 44aa93e633..b98f2cf605 100644 --- a/plugins/NewAwaySysMod/src/Services.cpp +++ b/plugins/NewAwaySysMod/src/Services.cpp @@ -96,12 +96,10 @@ int GetState(WPARAM wParam, LPARAM lParam, int Widechar) if ((pi->status >= ID_STATUS_ONLINE && pi->status <= ID_STATUS_OUTTOLUNCH) || !pi->status) {
TCString Msg(pi->status ? CProtoSettings(pi->szProto, pi->status).GetMsgFormat(GMF_LASTORDEFAULT) : CProtoSettings(pi->szProto).GetMsgFormat(((Flags & PIF_NOTTEMPORARY) ? 0 : GMF_TEMPORARY) | GMF_PERSONAL));
if (Msg != NULL) {
- pi->szMsg = (char*)mir_alloc(Msg.GetLen() + 1);
- _ASSERT(pi->szMsg);
if (Widechar)
- lstrcpyW(pi->wszMsg, Msg);
+ pi->tszMsg = mir_tstrdup(Msg);
else
- lstrcpyA(pi->szMsg, _T2A(Msg));
+ pi->szMsg = mir_strdup(_T2A(Msg));
}
else pi->szMsg = NULL;
|