1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +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); free (result);
if (c == '\n') if (c == '\n')
{ SCM_LINUM (port) -= 1;
/* What should col be in this case? SCM_DECCOL (port);
* We'll leave it at -1.
*/
SCM_LINUM (port) -= 1;
}
else
SCM_COL(port) -= 1;
} }
#undef FUNC_NAME #undef FUNC_NAME