diff options
| author | Kai Gunger <kgunger12@gmail.com> | 2026-11-15 18:44:38 -0500 |
|---|---|---|
| committer | Kai Gunger <kgunger12@gmail.com> | 2026-11-15 18:44:38 -0500 |
| commit | bcc923602fbbcb50a35e7870aec6b26c96175c10 (patch) | |
| tree | 60594e99af3f29eb2bd7d8f19eacc7bab2c71849 /text/cstr.tnsl | |
| parent | 3e09a6ae3aea3b90961e4216339368775ea7c842 (diff) | |
fixes to map
Diffstat (limited to 'text/cstr.tnsl')
| -rw-r--r-- | text/cstr.tnsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/text/cstr.tnsl b/text/cstr.tnsl index bf68c7f..01e300c 100644 --- a/text/cstr.tnsl +++ b/text/cstr.tnsl @@ -2,7 +2,7 @@ /; module cstr /; eq (~uint8 a, b) [bool] - /; loop (a` == b` && a` !== 0 && b` !== 0) [a++; b++] ;/ + /; loop (a` == b` && a` !== 0) [a++; b++] ;/ /; if (b` == 0 && a` == 0) return true @@ -18,7 +18,7 @@ ;/ /; copy (~uint8 str) [~uint8] - ~uint8 out = _alloc(length(str)) + ~uint8 out = _alloc(length(str) + 1) int i = 0 /; loop (str{i} !== 0) [out{i} = str{i}; i++] ;/ |