mirror of
https://github.com/uutils/coreutils
synced 2024-12-15 07:42:48 +00:00
core: size parser treat 000 as decimal
This commit is contained in:
parent
8ef926c6e8
commit
0465553f6e
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…
Reference in a new issue