aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-02-28 15:17:33 +0000
committerJustus Winter <[email protected]>2017-02-28 15:17:33 +0000
commit08e1cfddc94a6aae79b21d7795accf3e100a1f2f (patch)
tree35f5bd10e43301a731ae6ebc657b7608652081c2
parentgpgscm: Track source locations in every kind of ports. (diff)
downloadlibgpg-error-08e1cfddc94a6aae79b21d7795accf3e100a1f2f.tar.gz
libgpg-error-08e1cfddc94a6aae79b21d7795accf3e100a1f2f.zip
gpgscm: Fix calculating the line number.
* tests/gpgscm/scheme.c (opexe_5): Only increment the line number on newlines. Fixes-commit: 7cc57e2c63d0fa97569736419db5c76117e7685b Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--scheme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scheme.c b/scheme.c
index 405dee4..0453754 100644
--- a/scheme.c
+++ b/scheme.c
@@ -5045,8 +5045,8 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
int c = inchar(sc);
if (c != '\n')
backchar(sc,c);
- port_increment_current_line(sc,
- &sc->load_stack[sc->file_i], 1);
+ else
+ port_increment_current_line(sc, &sc->load_stack[sc->file_i], 1);
sc->nesting_stack[sc->file_i]--;
s_return(sc,reverse_in_place(sc, sc->NIL, sc->args));
} else if (sc->tok == TOK_DOT) {