From a1d2b3635c66140f3794cad8946648c7a853f5f0 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 26 Feb 2002 22:41:31 +0000 Subject: [PATCH] 2002-02-26 Marcus Brinkmann * verify.c (_gpgme_verify_status_handler): Fix the last change. --- trunk/gpgme/ChangeLog | 4 ++++ trunk/gpgme/verify.c | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 1b7930f..b8d396a 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2002-02-26 Marcus Brinkmann + + * verify.c (_gpgme_verify_status_handler): Fix the last change. + 2002-02-25 Marcus Brinkmann * engine.c (_gpgme_engine_op_encrypt_sign): New function. diff --git a/trunk/gpgme/verify.c b/trunk/gpgme/verify.c index ae63579..fd5debf 100644 --- a/trunk/gpgme/verify.c +++ b/trunk/gpgme/verify.c @@ -193,9 +193,14 @@ _gpgme_verify_status_handler (GpgmeCtx ctx, GpgStatusCode code, char *args) case STATUS_ERRSIG: /* The return code is the 6th argument, if it is 9, the problem is a missing key. */ - for (p = args, i = 0; p && i < 5; i++) - p = strchr (p, ' '); - if (p && *(++p) == '9' && *(++p) == '\0') + for (p = args, i = 0; p && *p && i < 5; i++) + { + p = strchr (p, ' '); + if (p) + while (*p == ' ') + p++; + } + if (p && *(p++) == '9' && (*p == '\0' || *p == ' ')) ctx->result.verify->status = GPGME_SIG_STAT_NOKEY; else ctx->result.verify->status = GPGME_SIG_STAT_ERROR; -- 2.26.2