aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-05-17 14:10:37 +0000
committerJustus Winter <[email protected]>2017-05-17 14:13:26 +0000
commitd2747ce24d445ae7ef3ec4ed0cca2f30aa833e7c (patch)
treecd5e58bf90f29c5d748b038acb2e37e2adb86acf
parenttests: Make it possible to run all tests using our infrastructure. (diff)
downloadlibgpg-error-d2747ce24d445ae7ef3ec4ed0cca2f30aa833e7c.tar.gz
libgpg-error-d2747ce24d445ae7ef3ec4ed0cca2f30aa833e7c.zip
gpgscm: Fix checking for opcode arguments.
* tests/gpgscm/scheme.c (Eval_Cycle): Update 'pcd' after dispatching an instruction. Fixes-commit: 9c6407d17e0cb9f4a370b1b83e7816577ec7d29d Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r--scheme.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scheme.c b/scheme.c
index 26bb5a5..593bc74 100644
--- a/scheme.c
+++ b/scheme.c
@@ -3451,9 +3451,10 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) {
double dd;
#endif
int (*comp_func)(num, num) = NULL;
- const struct op_code_info *pcd = &dispatch_table[op];
+ const struct op_code_info *pcd;
dispatch:
+ pcd = &dispatch_table[op];
if (pcd->name[0] != 0) { /* if built-in function, check arguments */
char msg[STRBUFFSIZE];
if (! check_arguments (sc, pcd, msg, sizeof msg)) {