PEL: pad hex words displayed in error message

In the message registry under "Documentation" and "Message", users can
include the hex words as part of the error message. This change pads
the displayed hex words so that the full eight digit hex number is
displayed.

Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I32c4204a1643b585dc1309f67976f4abb44fb04c
diff --git a/extensions/openpower-pels/src.cpp b/extensions/openpower-pels/src.cpp
index 538f3e2..4279a00 100644
--- a/extensions/openpower-pels/src.cpp
+++ b/extensions/openpower-pels/src.cpp
@@ -554,7 +554,7 @@
                             argSourceVals.size())
                     {
                         message.append(getNumberString(
-                            "0x%X", argSourceVals[wordIndex - 1]));
+                            "0x%08X", argSourceVals[wordIndex - 1]));
                     }
                     else
                     {
diff --git a/test/openpower-pels/src_test.cpp b/test/openpower-pels/src_test.cpp
index a9e52d2..11b15d4 100644
--- a/test/openpower-pels/src_test.cpp
+++ b/test/openpower-pels/src_test.cpp
@@ -356,9 +356,9 @@
 
     auto errorDetails = src.getErrorDetails(registry, DetailLevel::message);
     ASSERT_TRUE(errorDetails);
-    EXPECT_EQ(
-        errorDetails.value(),
-        "Comp 0x1 failed 0x4 times over 0x1E secs with ErrorCode 0x1ABCDEF");
+    EXPECT_EQ(errorDetails.value(),
+              "Comp 0x00000001 failed 0x00000004 times over 0x0000001E secs "
+              "with ErrorCode 0x01ABCDEF");
 }
 // Test that an inventory path callout string is
 // converted into the appropriate FRU callout.