diff --git a/libguile/ports.c b/libguile/ports.c index 4081183bc..1f9a50fe9 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -216,7 +216,7 @@ SCM scm_char_ready_p (port) SCM port; { - scm_port *pt = SCM_PTAB_ENTRY (port); + scm_port *pt; if (SCM_UNBNDP (port)) port = scm_cur_inp; @@ -224,6 +224,8 @@ scm_char_ready_p (port) SCM_ASSERT (SCM_NIMP (port) && SCM_OPINPORTP (port), port, SCM_ARG1, s_char_ready_p); + pt = SCM_PTAB_ENTRY (port); + /* if the current read buffer is filled, or the last pushed-back char has been read and the saved buffer is filled, result is true. */