diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-17 06:03:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-17 06:03:16 +0000 |
commit | eb146b049b43c6fb09e6f8c7716c1bbc88bf2159 (patch) | |
tree | 3f619c8a54dceb22012f10ac462c721e86abb46e /plugins/Sessions | |
parent | 342ebf07ab19ca68d14f16ea7be545e84a2a7f01 (diff) |
memory corruption fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@999 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 9e3f84c8d3..23636235ae 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -540,8 +540,8 @@ int SaveSessionDate() TCHAR *szDateBuf = (TCHAR*)mir_alloc((DateSize+1)*sizeof(TCHAR));
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, szDateBuf, DateSize );
- TCHAR *szSessionTime = (TCHAR*)mir_alloc((DateSize+TimeSize+5)*sizeof(TCHAR));
- int lenn = (int)_tcslen(szSessionTime);
+ int lenn = (DateSize+TimeSize+5);
+ TCHAR *szSessionTime = (TCHAR*)mir_alloc(lenn*sizeof(TCHAR));
mir_sntprintf(szSessionTime, lenn, _T("%s - %s"), szTimeBuf, szDateBuf);
char szSessionDate[256];
|