mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 23:00:22 +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:
parent
efd59562ee
commit
ae4c401660
1 changed files with 3 additions and 1 deletions
|
@ -216,7 +216,7 @@ SCM
|
||||||
scm_char_ready_p (port)
|
scm_char_ready_p (port)
|
||||||
SCM port;
|
SCM port;
|
||||||
{
|
{
|
||||||
scm_port *pt = SCM_PTAB_ENTRY (port);
|
scm_port *pt;
|
||||||
|
|
||||||
if (SCM_UNBNDP (port))
|
if (SCM_UNBNDP (port))
|
||||||
port = scm_cur_inp;
|
port = scm_cur_inp;
|
||||||
|
@ -224,6 +224,8 @@ scm_char_ready_p (port)
|
||||||
SCM_ASSERT (SCM_NIMP (port) && SCM_OPINPORTP (port), port, SCM_ARG1,
|
SCM_ASSERT (SCM_NIMP (port) && SCM_OPINPORTP (port), port, SCM_ARG1,
|
||||||
s_char_ready_p);
|
s_char_ready_p);
|
||||||
|
|
||||||
|
pt = SCM_PTAB_ENTRY (port);
|
||||||
|
|
||||||
/* if the current read buffer is filled, or the
|
/* if the current read buffer is filled, or the
|
||||||
last pushed-back char has been read and the saved buffer is
|
last pushed-back char has been read and the saved buffer is
|
||||||
filled, result is true. */
|
filled, result is true. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue