summaryrefslogtreecommitdiff
path: root/plugins/AssocMgr/src/reg.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-24 09:38:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-24 09:38:43 +0000
commitd499d067c4e901c3d8750726405002fe033f4771 (patch)
tree887a8a9ba9cf87ac2802921b46015e2aac69be64 /plugins/AssocMgr/src/reg.cpp
parentfd492249e2b276a2b88b88539988725541bcb988 (diff)
oops... missed another mir_snprintf in AssocMgr
git-svn-id: http://svn.miranda-ng.org/main/trunk@5465 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AssocMgr/src/reg.cpp')
-rw-r--r--plugins/AssocMgr/src/reg.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp
index 5f97defa14..be921d8c3a 100644
--- a/plugins/AssocMgr/src/reg.cpp
+++ b/plugins/AssocMgr/src/reg.cpp
@@ -98,20 +98,19 @@ static __inline LONG regchk(LONG res, const char *pszFunc, const void *pszInfo,
// mir_free() the return value
char *MakeFileClassName(const char *pszFileExt)
{
- char *pszClass;
- pszClass=(char*)mir_alloc((lstrlenA(pszFileExt)+12)*sizeof(TCHAR));
- if (pszClass!=NULL)
+ int cbLen = lstrlenA(pszFileExt)+12;
+ char *pszClass = (char*)mir_alloc(cbLen);
+ if (pszClass != NULL)
/* using correctly formated PROGID */
- mir_snprintf(pszClass, strlen(pszClass), "miranda%sfile", pszFileExt); /* includes dot, buffer safe */
+ mir_snprintf(pszClass, cbLen, "miranda%sfile", pszFileExt); /* includes dot, buffer safe */
return pszClass;
}
// mir_free() the return value
char *MakeUrlClassName(const char *pszUrl)
{
- char *pszClass;
- pszClass=mir_strdup(pszUrl);
- if (pszClass!=NULL)
+ char *pszClass = mir_strdup(pszUrl);
+ if (pszClass != NULL)
/* remove trailing : */
pszClass[lstrlenA(pszClass)-1]=0;
return pszClass;