fixing integer parsing bug

This commit is contained in:
mlokr 2024-09-04 17:13:43 +02:00
parent 894f73ca35
commit 3807276a55
No known key found for this signature in database
GPG key ID: DEA147DDEE644993

View file

@ -398,10 +398,10 @@ impl<'a, 'b> Parser<'a, 'b> {
};
E::Number {
pos: token.start,
value: match i64::from_str_radix(slice, radix as u32) {
value: match u64::from_str_radix(slice, radix as u32) {
Ok(value) => value,
Err(e) => self.report(format_args!("invalid number: {e}")),
},
} as i64,
radix,
}
}