IntelFrameworkModulePkg: SerialStatusCode output was incorrect

The string being built had a character being overwritten.  This
also lead to a NULL character being sent out to the serial port
for the last character in the string.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9669 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2010-01-04 16:17:52 +00:00
parent 451e64b070
commit af03df86f7
2 changed files with 6 additions and 6 deletions

View File

@ -94,7 +94,7 @@ SerialStatusCodeReportWorker (
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
&Buffer[CharCount],
(sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %g",
CallerId
@ -103,7 +103,7 @@ SerialStatusCodeReportWorker (
if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
&Buffer[CharCount],
(sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %x",
Data
@ -111,7 +111,7 @@ SerialStatusCodeReportWorker (
}
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
&Buffer[CharCount],
(sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
"\n\r"
);

View File

@ -92,7 +92,7 @@ SerialStatusCodeReportWorker (
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
&Buffer[CharCount],
(sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %g",
CallerId
@ -101,7 +101,7 @@ SerialStatusCodeReportWorker (
if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
&Buffer[CharCount],
(sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %x",
Data
@ -109,7 +109,7 @@ SerialStatusCodeReportWorker (
}
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
&Buffer[CharCount],
(sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
"\n\r"
);