From 3807276a555a8e7a1f7df15c2df99cf7c03e72b9 Mon Sep 17 00:00:00 2001 From: mlokr Date: Wed, 4 Sep 2024 17:13:43 +0200 Subject: [PATCH] fixing integer parsing bug --- hblang/src/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hblang/src/parser.rs b/hblang/src/parser.rs index 69c8012..809c913 100644 --- a/hblang/src/parser.rs +++ b/hblang/src/parser.rs @@ -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, } }