lua: byte-to-char only single chars (fix \0-escape regression breaking string lengths)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 21:29:43 +00:00
parent 9435fab790
commit 9560145228
4 changed files with 33 additions and 37 deletions

View File

@@ -3,13 +3,8 @@
(define lua-byte-to-char
(fn (n)
(cond
((= n 0) "\0")
((= n 7) "\a")
((= n 8) "\b")
((= n 9) "\t")
((= n 10) "\n")
((= n 11) "\v")
((= n 12) "\f")
((= n 13) "\r")
((and (>= n 32) (<= n 126)) (char-at __ascii-tok (- n 32)))
(else "?"))))