diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-25 23:47:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-25 23:47:56 +0300 |
commit | ea88e2c53d3ac0840955eb703213ca1430bb4361 (patch) | |
tree | 658c2290a12888922c9729a623d5d34e750bd626 /src/core/stdfile | |
parent | 45bf5f51cc788cb8f19e1b8fcd5b8818dc7a2e00 (diff) |
PROTORECVFILE now uses const char/wchar_t pointers. also fixes #1864 completely
Diffstat (limited to 'src/core/stdfile')
-rw-r--r-- | src/core/stdfile/src/file.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 67aa6dfddb..cd106fedba 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -368,9 +368,9 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam) bool bUnicode = (pre->dwFlags & PRFF_UNICODE) == PRFF_UNICODE;
- char *szDescr, **pszFiles;
+ const char *szDescr, **pszFiles;
if (bUnicode) {
- pszFiles = (char**)alloca(pre->fileCount * sizeof(char*));
+ pszFiles = (const char**)alloca(pre->fileCount * sizeof(char*));
for (int i = 0; i < pre->fileCount; i++)
pszFiles[i] = mir_utf8encodeW(pre->files.w[i]);
@@ -397,12 +397,12 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam) mir_strcpy((char*)p, pszFiles[i]);
p += mir_strlen(pszFiles[i]) + 1;
if (bUnicode)
- mir_free(pszFiles[i]);
+ mir_free((void*)pszFiles[i]);
}
mir_strcpy((char*)p, (szDescr == nullptr) ? "" : szDescr);
if (bUnicode)
- mir_free(szDescr);
+ mir_free((void*)szDescr);
MEVENT hdbe = db_event_add(ccs->hContact, &dbei);
PushFileEvent(ccs->hContact, hdbe, pre->lParam);
|