core: size parser treat 000 as decimal

This commit is contained in:
John Shin 2023-05-30 00:27:09 -07:00 committed by Sylvestre Ledru
parent 8ef926c6e8
commit 0465553f6e

View file

@ -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;
}