diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-30 14:56:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-30 14:56:20 +0000 |
commit | c62ba7b8f551e464e9b217db60a9613baca64f1e (patch) | |
tree | 00aa948b9e52e49642a3b9c5c34f7d9911a5211c /plugins/Scriver | |
parent | eb8ce4835cfe80601daaf64b6f842e63b85e62af (diff) |
fix to prevent C++ runtime from shutting down Miranda due to wrong data formats etc
git-svn-id: http://svn.miranda-ng.org/main/trunk@3368 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/chat/log.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp index 7cffea1360..7b886c0ee3 100644 --- a/plugins/Scriver/src/chat/log.cpp +++ b/plugins/Scriver/src/chat/log.cpp @@ -580,7 +580,8 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick) TCHAR* MakeTimeStamp( TCHAR* pszStamp, time_t time)
{
static TCHAR szTime[30];
- _tcsftime(szTime, 29, pszStamp, localtime(&time));
+ if ( !_tcsftime(szTime, SIZEOF(szTime)-1, pszStamp, localtime(&time)))
+ _tcsncpy(szTime, TranslateT("<invalid>"), SIZEOF(szTime));
return szTime;
}
@@ -973,7 +974,6 @@ void LoadMsgLogBitmaps(void) void FreeMsgLogBitmaps(void)
{
- int i;
- for (i = 0; i < SIZEOF(pLogIconBmpBits); i++)
+ for (int i = 0; i < SIZEOF(pLogIconBmpBits); i++)
mir_free(pLogIconBmpBits[i]);
}
|