summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/extBackg.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-11-29 15:30:09 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-11-29 15:30:09 +0000
commitfe076d92eca402b27979bacf4062563e759e7279 (patch)
treeacca86039c851dd4a85240c195f0e759787aecbe /plugins/Clist_nicer/src/extBackg.cpp
parent425e0f8eb79c6779ebe40f75cce92194ed103389 (diff)
-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
Diffstat (limited to 'plugins/Clist_nicer/src/extBackg.cpp')
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp16
1 files changed, 6 insertions, 10 deletions
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<char *>(malloc(3002));
+ char *szSections = reinterpret_cast<char *>(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);