summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-23 18:21:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-23 18:21:48 +0000
commite7d83ac464a137c2cf584fc9ffdff2d758a4f3d6 (patch)
tree930c220527bfa86825caa6885e75f45f51c24291
parent2476b4957b4a290bcceb40e6b25b4472d9dea22e (diff)
another mir_sntprintf
git-svn-id: http://svn.miranda-ng.org/main/trunk@5458 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/AssocMgr/src/reg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp
index 539f2392f9..5f97defa14 100644
--- a/plugins/AssocMgr/src/reg.cpp
+++ b/plugins/AssocMgr/src/reg.cpp
@@ -201,10 +201,10 @@ TCHAR *MakeIconLocation(HMODULE hModule,WORD nIconResID)
{
TCHAR szModule[MAX_PATH],*pszIconLoc=NULL;
int cch;
- if ((cch=GetModuleFileName(hModule,szModule,SIZEOF(szModule)))!=0) {
+ if ((cch=GetModuleFileName(hModule,szModule,SIZEOF(szModule))) != 0) {
pszIconLoc=(TCHAR*)mir_alloc((cch+=8)*sizeof(TCHAR));
if (pszIconLoc!=NULL)
- mir_sntprintf(pszIconLoc, _tcslen(pszIconLoc), _T("%s,%i"), szModule, -(int)nIconResID); /* id may be 0, buffer safe */
+ mir_sntprintf(pszIconLoc, cch, _T("%s,%i"), szModule, -(int)nIconResID); /* id may be 0, buffer safe */
}
return pszIconLoc;
}