summaryrefslogtreecommitdiff
path: root/tifmt.myr
diff options
context:
space:
mode:
Diffstat (limited to 'tifmt.myr')
-rw-r--r--tifmt.myr3
1 files changed, 2 insertions, 1 deletions
diff --git a/tifmt.myr b/tifmt.myr
index 9168be8..29f0831 100644
--- a/tifmt.myr
+++ b/tifmt.myr
@@ -324,6 +324,7 @@ const strfmt = {f, sb, lpad, width, prec, str
const scannum = {s : byte[:], start
var i, c
+ var begin = start#
i = start
while true
@@ -333,7 +334,7 @@ const scannum = {s : byte[:], start
;;
i# += std.charlen(c)
;;
- match std.intparse(s[:i#])
+ match std.intparse(s[begin:i#])
| `std.Some n: -> n
| `std.None: -> 0
;;