From: Marcus Brinkmann Date: Tue, 26 Feb 2002 22:41:31 +0000 (+0000) Subject: 2002-02-26 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~1075 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a1d2b3635c66140f3794cad8946648c7a853f5f0;p=gpgme.git 2002-02-26 Marcus Brinkmann * verify.c (_gpgme_verify_status_handler): Fix the last change. --- 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;