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:
parent
ebca3afedb
commit
681f2b8585
1 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue