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
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
This commit is contained in:
@@ -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 "?"))))
|
||||
|
||||
Reference in New Issue
Block a user