From 681f2b8585eeda8bc0b3e5acd78d80abd3385ee9 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 21 Jul 2014 21:35:49 +0200 Subject: [PATCH] scm_ungetc_unlocked should not result in negative columns * libguile/ports.c (scm_ungetc_unlocked): Use DECCOL in all cases, to avoid negative columns. --- libguile/ports.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libguile/ports.c b/libguile/ports.c index 5fb34248c..8185d8593 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -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 -- 2.20.1