mescc: support \x00 strings in M1.

* module/mes/M1.mes (object->m1): Support \x00 strings.
This commit is contained in:
rain1 2017-07-30 08:28:19 -04:00 committed by Jan Nieuwenhuizen
parent ec3c031b2f
commit 3f188d7268

View file

@ -150,7 +150,8 @@
(cond ((and (< len string-max)
(char? (car data))
(eq? (last data) #\nul)
(not (find (cut memq <> '(#\nul #\backspace #\return #\" #\')) (list-head data (1- (length data))))))
(not (find (cut memq <> '(#\nul #\backspace #\return #\" #\')) (list-head data (1- (length data)))))
(not (any (lambda (ch) (>= (char->integer ch) #x80)) data)))
(format #t "\"~a\"" (list->string (list-head data (1- (length data))))))
(else (format #t "~a" (string-join (map text->M1 data) " "))))
(newline)))