We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 076b905 + e91540f commit e340d81Copy full SHA for e340d81
src/uucore/src/lib/features/format/num_format.rs
@@ -146,10 +146,10 @@ impl Formatter for UnsignedInt {
146
// We also need to take into account that 0 should not be 00
147
// Since this is an unsigned int, we do not need to take the minus
148
// sign into account.
149
- if x != 0 {
150
- format!("0{x:o}")
151
- } else {
+ if x == 0 {
152
format!("{x:o}")
+ } else {
+ format!("0{x:o}")
153
}
154
155
UnsignedIntVariant::Hexadecimal(Case::Lowercase, Prefix::No) => {
0 commit comments