1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

scm_ungetc_unlocked should not result in negative columns

* libguile/ports.c (scm_ungetc_unlocked): Use DECCOL in all cases, to
  avoid negative columns.
This commit is contained in:
Andy Wingo 2014-07-21 21:35:49 +02:00
parent ebca3afedb
commit 681f2b8585

View file

@ -2172,14 +2172,8 @@ scm_ungetc_unlocked (scm_t_wchar c, SCM port)
free (result);
if (c == '\n')
{
/* What should col be in this case?
* We'll leave it at -1.
*/
SCM_LINUM (port) -= 1;
}
else
SCM_COL(port) -= 1;
SCM_LINUM (port) -= 1;
SCM_DECCOL (port);
}
#undef FUNC_NAME