about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--btpd/content.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btpd/content.c b/btpd/content.c
index ba1f354..d5177b1 100644
--- a/btpd/content.c
+++ b/btpd/content.c
@@ -362,7 +362,7 @@ cm_prealloc(struct torrent *tp, uint32_t piece)
 {
     struct content *cm = tp->cm;
 
-    if (cm_alloc_size == 0)
+    if (cm_alloc_size <= 0)
         set_bit(cm->pos_field, piece);
     else {
         unsigned npieces = ceil((double)cm_alloc_size / tp->meta.piece_length);