From e3ec1c46bc13ec4423ce51f36939121e6128d791 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 21 Sep 2013 16:21:55 +0000 Subject: allocation conflict git-svn-id: http://svn.miranda-ng.org/main/trunk@6161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/Template.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/IEView/src') diff --git a/plugins/IEView/src/Template.cpp b/plugins/IEView/src/Template.cpp index 158249762f..b1b078c4cd 100644 --- a/plugins/IEView/src/Template.cpp +++ b/plugins/IEView/src/Template.cpp @@ -360,7 +360,7 @@ TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, if (sscanf(store, "%s", tmp2) == EOF) continue; //template start bool bFound = false; - for (unsigned i = 0; i < sizeof(templateNames) / sizeof (templateNames[0]); i++) { + for (unsigned i = 0; i < SIZEOF(templateNames); i++) { if (!strncmp(store, templateNames[i].tokenString, templateNames[i].tokenLen)) { bFound = true; break; @@ -370,7 +370,8 @@ TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, if (wasTemplate) tmap->addTemplate(lastTemplate, templateText); - replaceStr(templateText, NULL); + if (templateText) + free(templateText), templateText = NULL; templateTextSize = 0; wasTemplate = true; sscanf(store, "