summaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/scheme.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2017-02-28 16:17:33 +0100
committerJustus Winter <justus@g10code.com>2017-02-28 16:17:33 +0100
commit058c97f9fc485405246b1adfcc905c1891550652 (patch)
tree83a58a92a0fa2f443a78d1985625e7aacdeb4261 /tests/gpgscm/scheme.c
parentgpg,tools: Make auto-key-retrieve configurable via gpgconf. (diff)
downloadgnupg2-058c97f9fc485405246b1adfcc905c1891550652.tar.xz
gnupg2-058c97f9fc485405246b1adfcc905c1891550652.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 <justus@g10code.com>
Diffstat (limited to '')
-rw-r--r--tests/gpgscm/scheme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 405dee4d2..0453754a6 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/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) {