aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/bytes.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-30 14:12:01 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-30 14:12:01 -0500
commit4d8aa867c7f4661167a4742fbdd865ed2449503e (patch)
tree67c9aeedaa3eb36585d1747e1f96e8c4708fc707 /src/stdlib/bytes.c
parentd302aaec38b9d295d39c4d87b53ee610bc9e0e07 (diff)
Add `base` parameter to integer parsing functions
Diffstat (limited to 'src/stdlib/bytes.c')
-rw-r--r--src/stdlib/bytes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/bytes.c b/src/stdlib/bytes.c
index ab689ae4..4416d804 100644
--- a/src/stdlib/bytes.c
+++ b/src/stdlib/bytes.c
@@ -33,8 +33,8 @@ public
CONSTFUNC bool Byte$is_between(const Byte_t x, const Byte_t low, const Byte_t high) { return low <= x && x <= high; }
public
-OptionalByte_t Byte$parse(Text_t text, Text_t *remainder) {
- OptionalInt_t full_int = Int$parse(text, remainder);
+OptionalByte_t Byte$parse(Text_t text, OptionalInt_t base, Text_t *remainder) {
+ OptionalInt_t full_int = Int$parse(text, base, remainder);
if (full_int.small != 0L && Int$compare_value(full_int, I(0)) >= 0 && Int$compare_value(full_int, I(255)) <= 0) {
return (OptionalByte_t){.has_value = true, .value = Byte$from_int(full_int, true)};
} else {