1 parent 2b45d38 commit 75b33e9Copy full SHA for 75b33e9
src/Platforms/Iar/UtestPlatform.cpp
@@ -115,7 +115,10 @@ static long TimeInMillisImplementation()
115
static const char* TimeStringImplementation()
116
{
117
time_t tm = time(NULL);
118
- return ctime(&tm);
+ char* pTimeStr = ctime(&tm);
119
+ char* newlineChar = strchr(pTimeStr, '\n'); // Find the terminating newline character.
120
+ if(newlineChar != NULL) *newlineChar = '\0'; //If newline is found replace it with the string terminator.
121
+ return (pTimeStr);
122
}
123
124
long (*GetPlatformSpecificTimeInMillis)() = TimeInMillisImplementation;
0 commit comments