mirror of https://github.com/acidanthera/audk.git
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:
parent
451e64b070
commit
af03df86f7
|
@ -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"
|
||||
);
|
||||
|
|
|
@ -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"
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue