hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit aeb84c2103b80441cc505e97162b9847a993814a
parent 83f52575d276d718824c31be4418a016567a30d8
Author: Armin Preiml <apreiml@strohwolke.at>
Date:   Sat, 27 Jul 2024 21:01:14 +0200

cmd/genoiddb: fix buggy foreach conversion

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>

Diffstat:
Mcmd/genoiddb/main.ha | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmd/genoiddb/main.ha b/cmd/genoiddb/main.ha @@ -87,7 +87,7 @@ fn write_db(h: io::handle, oids: []entry) (void | io::error) = { const maxcols = 12z; let idx = 0z; - for (let e .. oids) { + for (let e &.. oids) { e.idx = idx; let der = oidtoder(e.val); @@ -122,7 +122,8 @@ fn oidtoder(oid: str) []u8 = { der[0] = nums[0]: u8 * 40 + nums[1]: u8; let end = 1z; - for (let n .. nums) { + for (let i = 2z; i < len(nums); i += 1) { + let n = nums[i]; if (n == 0) { insert(der[end], 0u8); end = len(der);