Skip to content

Commit

Permalink
Fix #1763, last char truncated in coverage log output
Browse files Browse the repository at this point in the history
The "MessageCheck_Impl" routine used for printf/syslog checks
was incorrectly truncating the last character of the log message.
  • Loading branch information
jphickey committed Aug 4, 2021
1 parent c4ae5b2 commit 0710251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core_private/ut-stubs/src/ut_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,8 @@ bool CFE_UtAssert_MessageCheck_Impl(bool Status, const char *File, uint32 Line,
/* Need to make a copy, as the input string is "const" */
ScrubbedFormat[0] = '\'';
memcpy(&ScrubbedFormat[1], FormatString, FormatLen);
ScrubbedFormat[FormatLen] = '\'';
ScrubbedFormat[FormatLen + 1] = 0;
ScrubbedFormat[FormatLen + 1] = '\'';
ScrubbedFormat[FormatLen + 2] = 0;

return CFE_UtAssert_GenericSignedCompare_Impl(Status, CFE_UtAssert_Compare_GT, 0, File, Line, Desc, ScrubbedFormat,
"");
Expand Down

0 comments on commit 0710251

Please sign in to comment.