strconv: reject overflow before arithmetic
This commit is contained in:
@@ -48,8 +48,6 @@
|
||||
|
||||
package strconv;
|
||||
|
||||
import os;
|
||||
|
||||
// ref/hare/strconv/decimal.ha:5.
|
||||
def maxshift: u8 = 60u8;
|
||||
|
||||
@@ -59,7 +57,7 @@ def decimal_point_range: u16 = 2047u16;
|
||||
// ref/hare/strconv/decimal.ha:8-26. Field layout 1:1. The 800-digit
|
||||
// bound covers subnormal doubles (min exp -1074, max mantissa 4e16
|
||||
// → at most 767 digits; 800 leaves headroom).
|
||||
export type decimal = struct {
|
||||
type decimal = struct {
|
||||
digits: [800]u8,
|
||||
nd: size,
|
||||
dp: i32,
|
||||
|
||||
Reference in New Issue
Block a user