fix bug in printing the character #\x0

This commit is contained in:
Jeff Bezanson 2017-08-19 14:18:32 -04:00 committed by Lassi Kortela
parent 654fe0576a
commit 20a768b4d7
2 changed files with 5 additions and 1 deletions

View File

@ -635,7 +635,10 @@ static void cvalue_printdata(ios_t *f, void *data, size_t len, value_t type,
seq[nb] = '\0';
if (print_princ) {
// TODO: better multibyte handling
outs(seq, f);
if (wc == 0)
ios_putc(0, f);
else
outs(seq, f);
}
else {
outsn("#\\", f, 2);

View File

@ -78,6 +78,7 @@
(assert (equal? (uint64 (double -123)) #uint64(0xffffffffffffff85)))
(assert (equal? (string 'sym #byte(65) #wchar(945) "blah") "symA\u03B1blah"))
(assert (= (length (string #\x0)) 1))
(assert (> 9223372036854775808 9223372036854775807))