aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-01 20:15:02 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-01 20:15:02 -0400
commit94ff047dd74cd3ad793f68503729a0fe004c10f4 (patch)
treeaed132e987b2a81f033376e2a380dbbf685ab9fa /src
parente156d74ee6ea4030776d97601bc930eae560086d (diff)
Bugfix for Int.parse()
Diffstat (limited to 'src')
-rw-r--r--src/stdlib/integers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/integers.c b/src/stdlib/integers.c
index 5dc9ac55..863bb42d 100644
--- a/src/stdlib/integers.c
+++ b/src/stdlib/integers.c
@@ -430,7 +430,7 @@ OptionalInt_t Int$parse(Text_t text, Text_t *remainder) {
else if (*end != '\0') return NONE_INT;
result = mpz_init_set_str(i, str + 2, 2);
} else {
- const char *end = str + 2 + strspn(str + 2, "0123456789");
+ const char *end = str + strspn(str, "0123456789");
if (remainder) *remainder = Text$from_str(end);
else if (*end != '\0') return NONE_INT;
result = mpz_init_set_str(i, str, 10);