1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-04-05 16:56:46 +02:00
parent c7f0d90592
commit 1b6adab41d
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020

View File

@ -4884,7 +4884,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
if(c==EOF) { if(c==EOF) {
s_return(sc,sc->EOF_OBJ); s_return(sc,sc->EOF_OBJ);
} }
if(sc->op==OP_PEEK_CHAR) { if(op==OP_PEEK_CHAR) {
backchar(sc,c); backchar(sc,c);
} }
s_return(sc,mk_character(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* */ CASE(OP_VM_HISTORY): /* *vm-history* */
s_return(sc, history_flatten(sc)); s_return(sc, history_flatten(sc));
default: default:
snprintf(sc->strbuff,STRBUFFSIZE,"%d: illegal operator", sc->op); snprintf(sc->strbuff,STRBUFFSIZE,"%d: illegal operator", op);
Error_0(sc,sc->strbuff); Error_0(sc,sc->strbuff);
} }
return sc->T; /* NOTREACHED */ return sc->T; /* NOTREACHED */