1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

* ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry

until we've verified that it is actually a port.  (Thanks to
Lorentey Karoly.)
This commit is contained in:
Jim Blandy 1999-08-01 08:07:40 +00:00
parent efd59562ee
commit ae4c401660

View file

@ -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. */