diff options
author | Mataes <mataes2007@gmail.com> | 2018-03-31 19:46:30 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2018-03-31 19:47:22 +0300 |
commit | ddfe019e197fbda2aefd823f52d4edd4a82db883 (patch) | |
tree | 50e535b1481558ef171309aa09bee66100684445 /plugins/MirOTR/src/svcs_proto.cpp | |
parent | 162ee0f2f5d1e44dda7d52ec4e32d0b37876e11b (diff) |
MirOTR: remove mir_strcpy
Diffstat (limited to 'plugins/MirOTR/src/svcs_proto.cpp')
-rw-r--r-- | plugins/MirOTR/src/svcs_proto.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp index 147d79b1e7..37ccce5f15 100644 --- a/plugins/MirOTR/src/svcs_proto.cpp +++ b/plugins/MirOTR/src/svcs_proto.cpp @@ -136,12 +136,10 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam) msg_free = mir_free; } if (options.prefix_messages) { - size_t len = (mir_strlen(options.prefix)+mir_strlen(newmessage)+1)*sizeof(char); - char* tmp = (char*)mir_alloc( len ); - mir_strcpy(tmp, options.prefix); - mir_strcat(tmp, newmessage); + CMStringA tmp = options.prefix; + tmp.Append(newmessage); msg_free(newmessage); - newmessage = tmp; + newmessage = mir_strdup(tmp); msg_free = mir_free; } pre->szMessage = newmessage; |