diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-21 16:21:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-21 16:21:55 +0000 |
commit | e3ec1c46bc13ec4423ce51f36939121e6128d791 (patch) | |
tree | 887a33a0913a5f5a87a826cbad39de375caaa337 /plugins/IEView | |
parent | ff54bf99d2abafbfbedba47d1f3f940276323446 (diff) |
allocation conflict
git-svn-id: http://svn.miranda-ng.org/main/trunk@6161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r-- | plugins/IEView/src/Template.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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, "<!--%[^-]", lastTemplate);
@@ -380,7 +381,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;
fclose(fh);
static const char *groupTemplates[] = {"MessageInGroupStart", "MessageInGroupInner",
|