diff options
Diffstat (limited to 'src/core/stdchat')
-rw-r--r-- | src/core/stdchat/src/log.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/stdchat/src/log.cpp b/src/core/stdchat/src/log.cpp index 86b2f41b0a..193c9bb719 100644 --- a/src/core/stdchat/src/log.cpp +++ b/src/core/stdchat/src/log.cpp @@ -318,7 +318,8 @@ static void AddEventToBuffer(char **buffer, int *bufferEnd, int *bufferAlloced, 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;
}
|