1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +02:00

scm_i_make_transcoded_port: fix mode for input/output ports

* libguile/r6rs-ports.c (scm_i_make_transcoded_ports): make sure to
  include SCM_RDNG for input/output ports.

Thanks to Göran Weinholt for reporting the problem.

Closes: 41045
This commit is contained in:
Rob Browning 2020-10-04 14:05:29 -05:00
parent f1547e1d58
commit d0d1f68794
2 changed files with 28 additions and 2 deletions

View file

@ -1168,8 +1168,8 @@ SCM_DEFINE (scm_i_make_transcoded_port,
if (scm_is_true (scm_output_port_p (port)))
mode |= SCM_WRTNG;
else if (scm_is_true (scm_input_port_p (port)))
mode |= SCM_RDNG;
if (scm_is_true (scm_input_port_p (port)))
mode |= SCM_RDNG;
result = make_transcoded_port (port, mode);