Index: /trunk/src/VBox/Runtime/common/string/strformatrt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 37964)
+++ /trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 37965)
@@ -1022,5 +1022,5 @@
         if ((a_uVal) & (a_fBitMask)) \
         { \
-            if (!cPrinted) \
+            if (!cPrinted++) \
                 cchOutput += pfnOutput(pvArgOutput, "{" a_szName, sizeof(a_szName)); \
             else \
@@ -1033,5 +1033,5 @@
         if ((a_uVal)) \
         { \
-            cchOutput += pfnOutput(pvArgOutput, cPrinted ? "{unkn=" : ",unkn=", 6); \
+            cchOutput += pfnOutput(pvArgOutput, !cPrinted ? "{unkn=" : ",unkn=", 6); \
             cch = RTStrFormatNumber(&szBuf[0], (a_uVal), 16, 8, -1, fFlags); \
             cchOutput += pfnOutput(pvArgOutput, szBuf, cch); \
Index: /trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp	(revision 37964)
+++ /trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp	(revision 37965)
@@ -590,4 +590,13 @@
 
     /*
+     * x86 register formatting.
+     */
+    RTTestSub(hTest, "x86 register format types (%RAx86[*])");
+    CHECK42("%'RU64", _1E, "1 152 921 504 606 846 976");
+    CHECK42("%RAx86[cr0]", UINT64_C(0x80000011),    "80000011{PE,ET,PG}");
+    CHECK42("%RAx86[cr4]", UINT64_C(0x80000001),    "80000001{VME,unkn=80000000}");
+    CHECK42("%#RAx86[cr4]", UINT64_C(0x80000001),    "0x80000001{VME,unkn=0x80000000}");
+
+    /*
      * Custom types.
      */
