From 3712107a333f03a415c38991cd078167e34d2c59 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 9 Jan 2016 19:29:53 +0000 Subject: fix for unicode file names git-svn-id: http://svn.miranda-ng.org/main/trunk@16072 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/ICQCorp/src/corp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/ICQCorp') diff --git a/protocols/ICQCorp/src/corp.cpp b/protocols/ICQCorp/src/corp.cpp index 70dbea0cb8..8d57af8048 100644 --- a/protocols/ICQCorp/src/corp.cpp +++ b/protocols/ICQCorp/src/corp.cpp @@ -62,12 +62,12 @@ extern "C" __declspec(dllexport) int Load() mir_getLP(&pluginInfo); char fileName[MAX_PATH]; - WIN32_FIND_DATA findData; + GetModuleFileNameA(hInstance, fileName, MAX_PATH); - GetModuleFileName(hInstance, fileName, MAX_PATH); - FindClose(FindFirstFile(fileName, &findData)); - findData.cFileName[mir_strlen(findData.cFileName) - 4] = 0; - mir_strcpy(protoName, findData.cFileName); + WIN32_FIND_DATAA findData; + FindClose(FindFirstFileA(fileName, &findData)); + findData.cFileName[strlen(findData.cFileName) - 4] = 0; + strncpy_s(protoName, findData.cFileName, _TRUNCATE); PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE }; pd.szName = protoName; -- cgit v1.2.3