summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/CLUIFrames
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_nicer/src/CLUIFrames')
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index e371374fe7..bd14dfc47b 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -525,20 +525,15 @@ int DBStoreFrameSettingsAtPos(int pos, int Frameid)
int LocateStorePosition(int Frameid, int maxstored)
{
- int i;
- LPTSTR frmname;
- char settingname[255];
if (Frames[Frameid].name == NULL) return -1;
- for (i = 0;i < maxstored;i++) {
+ for (int i = 0;i < maxstored;i++) {
+ char settingname[255];
mir_snprintf(settingname, sizeof(settingname), "Name%d", i);
- frmname = DBGetStringT(0, CLUIFrameModule, settingname);
+ mir_ptr<TCHAR> frmname( db_get_tsa(0, CLUIFrameModule, settingname));
if (frmname == NULL) continue;
- if (lstrcmpi(frmname, Frames[Frameid].name) == 0) {
- mir_free(frmname);
+ if (lstrcmpi(frmname, Frames[Frameid].name) == 0)
return i;
- }
- mir_free(frmname);
}
return -1;
}