From ddfe019e197fbda2aefd823f52d4edd4a82db883 Mon Sep 17 00:00:00 2001 From: Mataes Date: Sat, 31 Mar 2018 19:46:30 +0300 Subject: MirOTR: remove mir_strcpy --- plugins/MirOTR/src/svcs_proto.cpp | 8 +++----- 1 file 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; -- cgit v1.2.3