]> the.earth.li Git - onak.git/blobdiff - onak.c
Fix "onak dump" to actually generate multiple output files
[onak.git] / onak.c
diff --git a/onak.c b/onak.c
index 30f771084931b3ee249f8d2e497d2d0edff89b55..40e8b0e09277850b8beb4fa6c2465c16726f9efe 100644 (file)
--- a/onak.c
+++ b/onak.c
@@ -74,7 +74,7 @@ void dump_func(void *ctx, struct openpgp_publickey *key)
 
        state = (struct dump_ctx *) ctx;
 
-       if (state->fd == -1 || state->count > state->maxcount) {
+       if (state->fd == -1 || state->count++ > state->maxcount) {
                if (state->fd != -1) {
                        close(state->fd);
                        state->fd = -1;