mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 12:37:49 +00:00
core: size parser treat 000 as decimal
This commit is contained in:
parent
af528ba84e
commit
aed8a5759a
1 changed files with 2 additions and 1 deletions
|
@ -197,7 +197,8 @@ impl<'parser> Parser<'parser> {
|
|||
.take_while(|c| c.is_ascii_digit())
|
||||
.collect::<String>()
|
||||
.len();
|
||||
if size.starts_with('0') && num_digits > 1 {
|
||||
let all_zeros = size.chars().all(|c| c == '0');
|
||||
if size.starts_with('0') && num_digits > 1 && !all_zeros {
|
||||
return NumberSystem::Octal;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue