About print information bug #2558
Answered
by
tt4g
adrian-yehe
asked this question in
Q&A
-
The printed information is different from the expected result。
|
Beta Was this translation helpful? Give feedback.
Answered by
tt4g
Nov 29, 2022
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.
1 reply
Answer selected by
adrian-yehe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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