Skip to content

Commit

Permalink
fix tc_logger crash in arm 32
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Oct 11, 2023
1 parent 8026c47 commit 51072e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/include/util/tc_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,9 @@ namespace tars

TC_Port::localtime_r(&t, &tt);

const char *szFormat = (_bHasSquareBracket) ? ("[%04d-%02d-%02d %02d:%02d:%02d.%03ld]%s") : ("%04d-%02d-%02d %02d:%02d:%02d.%03ld%s");
const char *szFormat = (_bHasSquareBracket) ? ("[%04d-%02d-%02d %02d:%02d:%02d.%03d]%s") : ("%04d-%02d-%02d %02d:%02d:%02d.%03d%s");
n += snprintf(c + n, len - n, szFormat,
tt.tm_year + 1900, tt.tm_mon + 1, tt.tm_mday, tt.tm_hour, tt.tm_min, tt.tm_sec, duration_in_ms % 1000, _sSepar.c_str());
tt.tm_year + 1900, tt.tm_mon + 1, tt.tm_mday, tt.tm_hour, tt.tm_min, tt.tm_sec, (int)(duration_in_ms % 1000), _sSepar.c_str());
}
else if (hasFlag(TC_Logger::HAS_TIME))
{
Expand Down

0 comments on commit 51072e4

Please sign in to comment.