summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-11 03:45:24 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-11 03:45:24 +0000
commit30d636c8d97057a2b5b3d696757c868710a94d2c (patch)
tree9c65e6751d217a5983d522f395246bdb9fe3d07f /MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
parent79b74a03e018ecbf03d8d50e6f20301e249c1ba5 (diff)
downloadedk2-30d636c8d97057a2b5b3d696757c868710a94d2c.tar.gz
edk2-30d636c8d97057a2b5b3d696757c868710a94d2c.tar.bz2
edk2-30d636c8d97057a2b5b3d696757c868710a94d2c.zip
AsciiSPrint returns The number of ASCII characters in the produced output buffer not including the Null-terminator, but SerialStatusCodeWorker has bug which overwrites the last character, which causes there is a missing character in serial log output. The fix is to resolve this issue.
Signed-off-by: li-elvin Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12526 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c')
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
index 4a5d65d25e..19b67b00b7 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
@@ -1,7 +1,7 @@
/** @file
Serial I/O status code reporting worker.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -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"
);