diff --git a/bip/src/lib.rs b/bip/src/lib.rs index c597544..a5d0bdf 100644 --- a/bip/src/lib.rs +++ b/bip/src/lib.rs @@ -112,12 +112,10 @@ impl Symbol { let v = Symbol::take(&mut it, |c| c.is_numeric()); if let Ok(n) = v.iter().collect::().parse::() { - let n = (n as i64 * sign) as u64; - syms.push(if sign > 0 { Self::Int(n) } else { - Self::SInt(n) + Self::SInt((n as i64 * sign) as u64) }); } else { return Err("invalid integer".to_string());