aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-make')
-rw-r--r--src/blogc-make/rules.c3
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,