summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstore/make.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstore/make.c b/libstore/make.c
index d64e305e..f899398c 100644
--- a/libstore/make.c
+++ b/libstore/make.c
@@ -30,7 +30,7 @@ _store_create (const struct store_class *class,
const struct store_run *runs, size_t num_runs, off_t end,
struct store **store)
{
- if (block_size & (block_size - 1))
+ if ((block_size & (block_size - 1)) || (block_size == 0 && num_runs > 0))
return EINVAL; /* block size not a power of two. */
else
{