About print information bug #2558
-
The printed information is different from the expected result。
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your syntax of fmt library is wrong. Replace last syntax -#define SMMU_VER_MAJOR (3) #define SMMU_VER_MINOR (0) #define SMMU_VER_PATCH (1) spdlog::info("Welcome to SMMU version 0x{0:x}.{0:d}.0x{0:x} !", SMMU_VER_MAJOR, SMMU_VER_MINOR, SMMU_VER_PATCH);
+#define SMMU_VER_MAJOR (3) #define SMMU_VER_MINOR (0) #define SMMU_VER_PATCH (1) spdlog::info("Welcome to SMMU version 0x{0:x}.{0:d}.0x{:#02d} !", SMMU_VER_MAJOR, SMMU_VER_MINOR, SMMU_VER_PATCH); See fmt syntax: https://fmt.dev/9.0.0/syntax.html |
Beta Was this translation helpful? Give feedback.
Your syntax of fmt library is wrong. Replace last syntax
0x{0:x}
with0x{:#02d}
for padding left.See fmt syntax: https://fmt.dev/9.0.0/syntax.html