make index operator just read 1 byte

This commit is contained in:
2025-11-13 20:17:12 +01:00
parent c1bd84464c
commit 852c463532
9 changed files with 59 additions and 56 deletions

View File

@@ -14,7 +14,7 @@ func main[argc: I64, argv: Ptr] : I64
let host_start: I64 = 7
let i: I64 = host_start
while i < url_len
if str.nth(url, i) == '/'
if url[i] == '/'
break
i = i + 1
@@ -44,7 +44,7 @@ func main[argc: I64, argv: Ptr] : I64
let current_size: I64 = header_size + n
i = 0
while i <= current_size - 4
if str.nth(header_buf, i) == 13 & str.nth(header_buf, i+1) == 10 & str.nth(header_buf, i+2) == 13 & str.nth(header_buf, i+3) == 10
if header_buf[i] == 13 & header_buf[i+1] == 10 & header_buf[i+2] == 13 & header_buf[i+3] == 10
found = true
end_index = i + 4
break