aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-04-05 14:56:46 +0000
committerJustus Winter <[email protected]>2017-04-10 12:57:36 +0000
commitafb7060de5c55976d08e0692fbffd0cc108914a0 (patch)
tree02a62e884b9dbe48edf248a7dd8008baf44cfbf0
parentgpgscm: Mmap script files. (diff)
downloadlibgpg-error-afb7060de5c55976d08e0692fbffd0cc108914a0.tar.gz
libgpg-error-afb7060de5c55976d08e0692fbffd0cc108914a0.zip
gpgscm: Fix opcode dispatch.
* tests/gpgscm/scheme.c (opexe_0): Consider 'op', not 'sc->op'. The former is the opcode we are currently executing. 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 fd99207..933dc45 100644
--- a/scheme.c
+++ b/scheme.c
@@ -4884,7 +4884,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
if(c==EOF) {
s_return(sc,sc->EOF_OBJ);
}
- if(sc->op==OP_PEEK_CHAR) {
+ if(op==OP_PEEK_CHAR) {
backchar(sc,c);
}
s_return(sc,mk_character(sc,c));
@@ -5183,7 +5183,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
CASE(OP_VM_HISTORY): /* *vm-history* */
s_return(sc, history_flatten(sc));
default:
- snprintf(sc->strbuff,STRBUFFSIZE,"%d: illegal operator", sc->op);
+ snprintf(sc->strbuff,STRBUFFSIZE,"%d: illegal operator", op);
Error_0(sc,sc->strbuff);
}
return sc->T; /* NOTREACHED */