From 584c03d1534a20f23a421a40dcc9822dfe36dd55 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 7 Apr 2012 17:42:39 +0300 Subject: [PATCH] Chaned Time without Format= to return timestamp instead of empty string (%H:%M:%S was returned prior to 70117876) --- Library/MeasureTime.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/MeasureTime.cpp b/Library/MeasureTime.cpp index ab05e050..7ed54b71 100644 --- a/Library/MeasureTime.cpp +++ b/Library/MeasureTime.cpp @@ -76,7 +76,7 @@ void CMeasureTime::TimeToString(WCHAR* buf, size_t bufLen, const WCHAR* format, _CrtSetReportMode(_CRT_ASSERT, 0); errno = 0; - wcsftime(buf, bufLen, m_Format.c_str(), time); + wcsftime(buf, bufLen, format, time); if (errno == EINVAL) { LogWithArgs(LOG_ERROR, L"Time: \"Format=%s\" invalid in [%s]", format, m_Name.c_str()); @@ -201,13 +201,13 @@ const WCHAR* CMeasureTime::GetStringValue(AUTOSCALE autoScale, double scale, int { TimeToString(tmpSz, MAX_LINE_LENGTH, format, &today); } + + return CheckSubstitute(tmpSz); } else { - TimeToString(tmpSz, MAX_LINE_LENGTH, L"%H:%M:%S", &today); + return CMeasure::GetStringValue(autoScale, scale, decimals, percentual); } - - return CheckSubstitute(tmpSz); } /*