From fe076d92eca402b27979bacf4062563e759e7279 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 29 Nov 2014 15:30:09 +0000 Subject: -Fixed a bug in Ping and other small things reported in #837 git-svn-id: http://svn.miranda-ng.org/main/trunk@11151 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/extBackg.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index d623f56707..5b176c7a3f 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -1176,20 +1176,15 @@ static void BTN_ReadItem(char *itemName, char *file) void IMG_LoadItems() { - char *szSections = NULL; - char *p; DBVARIANT dbv; - char szFileName[MAX_PATH]; - TCHAR tszFileName[MAX_PATH]; - int i = 0; - if (cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) return; + TCHAR tszFileName[MAX_PATH]; MY_pathToAbsolute(dbv.ptszVal, tszFileName); // TODO: rewrite the skin loading in TCHAR manner - + char szFileName[MAX_PATH]; WideCharToMultiByte(CP_ACP, 0, tszFileName, MAX_PATH, szFileName, MAX_PATH, 0, 0); db_free(&dbv); @@ -1197,15 +1192,16 @@ void IMG_LoadItems() if (!PathFileExists(tszFileName)) return; + int i = 0; + IMG_DeleteItems(); - szSections = reinterpret_cast(malloc(3002)); + char *szSections = reinterpret_cast(malloc(3002)); ZeroMemory(szSections, 3002); - p = szSections; GetPrivateProfileSectionNamesA(szSections, 3000, szFileName); szSections[3001] = szSections[3000] = 0; - p = szSections; + char *p = szSections; while (lstrlenA(p) > 1) { if (p[0] == '$' || p[0] == '@') IMG_ReadItem(p, szFileName); -- cgit v1.2.3