diff --git a/runtime.c b/runtime.c index 7df4729c..22290b04 100644 --- a/runtime.c +++ b/runtime.c @@ -1119,7 +1119,7 @@ object Cyc_write_u8(void *data, object c, object port) if (obj_is_char(c)) { FILE *fp = ((port_type *) port)->fp; if (fp){ - char_type unbox = obj_obj2char(c); + char unbox = (char) obj_obj2char(c); fprintf(fp, "%c", unbox); } } else { diff --git a/scheme/base.sld b/scheme/base.sld index 55f88c21..04dc8574 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -645,7 +645,7 @@ (_peek-u8 (car port)))) (define (write-u8 chr . port) (if (null? port) - (_write-u8 chr (current-input-port)) + (_write-u8 chr (current-output-port)) (_write-u8 chr (car port)))) (define (peek-char . port) (if (null? port)