]> the.earth.li Git - onak.git/blobdiff - parsekey.c
cscvs to tla changeset 105
[onak.git] / parsekey.c
index b9211863111cb3c00d2686efc8f2313115192589..35c14c08c07170b5289a7c8626408edbcb07bf3c 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright 2002 Project Purple
  *
- * $Id: parsekey.c,v 1.13 2003/09/30 20:40:11 noodles Exp $
+ * $Id: parsekey.c,v 1.15 2003/10/03 23:24:16 noodles Exp $
  */
 
 #include <assert.h>
@@ -189,8 +189,8 @@ int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
                }
        }
 
-       while (!rc && !getchar_func(ctx, 1, &curchar) &&
-                       (maxnum == 0 || keys < maxnum)) {
+       while (!rc && (maxnum == 0 || keys < maxnum) &&
+                       !getchar_func(ctx, 1, &curchar)) {
                if (!inpacket && (curchar & 0x80)) {
                        /*
                         * New packet. Record the fact we're in a packet and
@@ -231,7 +231,7 @@ int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
                                        curpacket->packet->length < 255) {
                                        logthing(LOGTHING_NOTICE,
                                                "Partial length;"
-                                               " not supported.\n");
+                                               " not supported.");
                                } else if (curpacket->packet->length == 255) {
                                        /*
                                         * 5 byte length; ie 255 followed by 3