]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
Merge branch 'refs/heads/t/ff'
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 0db2c5803dfa4c100b092f9c022759f1b85e043b..c04d4f9c99e89afb451afe94be7fcc64461b15e1 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -396,7 +396,7 @@ static void save_chunk_table(struct afh_info *afhi, char *buf)
 {
        uint32_t n;
 
-       if (!afhi->chunk_table)
+       if (!afhi->chunk_table || afhi->chunks_total == 0)
                return;
        for (n = 0; n <= afhi->chunks_total; n++)
                write_u32(buf + 4 * n, afhi->chunk_table[n]);