mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 01:07:34 +02:00
Issue #465 - Avoid trigraphs in compiled strings
This commit is contained in:
parent
867b60bb14
commit
92aeec6a2e
2 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ Bug Fixes
|
|||
|
||||
- Fix `read-line` to prevent data loss when used in conjunction with other I/O functions (such as `read-char`) to read from the same port. Previous versions of `read-line` would use a different internal buffer than our other I/O functions.
|
||||
- Properly handle literal vectors at the top level of compiled code.
|
||||
- Properly escape C strings in compiled code to avoid trigraphs.
|
||||
|
||||
## 0.30.0 - July 2, 2021
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@
|
|||
(letrec ((next (lambda (head tail)
|
||||
(cond
|
||||
((null? head) (list->string (reverse tail)))
|
||||
((equal? (car head) #\?) ;; Escape ? to avoid trigraphs
|
||||
(next (cdr head) (cons #\? (cons #\\ tail))))
|
||||
((equal? (car head) #\")
|
||||
(next (cdr head) (cons #\" (cons #\\ tail))))
|
||||
((equal? (car head) #\\)
|
||||
|
|
Loading…
Add table
Reference in a new issue