diff options
Diffstat (limited to 'src/blogc-make')
-rw-r--r-- | src/blogc-make/rules.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c index d8614b6..79d722a 100644 --- a/src/blogc-make/rules.c +++ b/src/blogc-make/rules.c @@ -228,6 +228,9 @@ pagination_outputlist(bm_ctx_t *ctx) long posts_per_page = strtol( bc_trie_lookup(ctx->settings->settings, "posts_per_page"), NULL, 10); // FIXME: improve + if (posts_per_page <= 0) + return NULL; + size_t pages = ceilf(((float) num_posts) / posts_per_page); const char *pagination_prefix = bc_trie_lookup(ctx->settings->settings, |