]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg: SerialStatusCode output was incorrect
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Jan 2010 16:17:52 +0000 (16:17 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Jan 2010 16:17:52 +0000 (16:17 +0000)
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

IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c

index 1b409310cf230efbcf9874cefcbd92368440c573..c3cac2b6acddf137d71956c4eada3612ab22052d 100644 (file)
@@ -94,7 +94,7 @@ SerialStatusCodeReportWorker (
 \r
     if (CallerId != NULL) {\r
       CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
+                     &Buffer[CharCount],\r
                      (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
                      " %g",\r
                      CallerId\r
@@ -103,7 +103,7 @@ SerialStatusCodeReportWorker (
 \r
     if (Data != NULL) {\r
       CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
+                     &Buffer[CharCount],\r
                      (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
                      " %x",\r
                      Data\r
@@ -111,7 +111,7 @@ SerialStatusCodeReportWorker (
     }\r
 \r
     CharCount += AsciiSPrint (\r
-                   &Buffer[CharCount - 1],\r
+                   &Buffer[CharCount],\r
                    (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
                    "\n\r"\r
                    );\r
index c4e9e3340ba789976e7d83a99698968170e58c02..3ebaaed6cdb21847d0836fc7f5aea3dc598cd7e4 100644 (file)
@@ -92,7 +92,7 @@ SerialStatusCodeReportWorker (
    \r
     if (CallerId != NULL) {\r
       CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
+                     &Buffer[CharCount],\r
                      (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
                      " %g",\r
                      CallerId\r
@@ -101,7 +101,7 @@ SerialStatusCodeReportWorker (
 \r
     if (Data != NULL) {\r
       CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
+                     &Buffer[CharCount],\r
                      (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
                      " %x",\r
                      Data\r
@@ -109,7 +109,7 @@ SerialStatusCodeReportWorker (
     }\r
 \r
     CharCount += AsciiSPrint (\r
-                   &Buffer[CharCount - 1],\r
+                   &Buffer[CharCount],\r
                    (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
                    "\n\r"\r
                    );\r