fixfix
authorTero Marttila <terom@fixme.fi>
Sun, 24 Jan 2010 23:20:39 +0200
changeset 55 a3542e78ecd8
parent 54 4a25113cb2a4
child 56 d5e3089906da
fixfix
src/lib/cache.c
src/util/main.c
--- a/src/lib/cache.c	Sun Jan 24 23:17:10 2010 +0200
+++ b/src/lib/cache.c	Sun Jan 24 23:20:39 2010 +0200
@@ -377,7 +377,7 @@
         
         // skip background-colored regions to keep the cache file sparse
         // ...in blocks of PT_CACHE_BLOCK_SIZE bytes
-        for (size_t col_base = 0; col_base < cache->header->width; ){
+        for (size_t col_base = 0; col_base < cache->header->width; col_base += PT_CACHE_BLOCK_SIZE) {
             // size of this block in bytes
             size_t block_size = min(PT_CACHE_BLOCK_SIZE * cache->header->col_bytes, cache->header->row_bytes - col_base);
 
--- a/src/util/main.c	Sun Jan 24 23:17:10 2010 +0200
+++ b/src/util/main.c	Sun Jan 24 23:20:39 2010 +0200
@@ -208,7 +208,7 @@
             log_info("\tImage dimensions: %zux%zu", img_info->width, img_info->height);
             log_info("\tImage mtime=%u, bytes=%zu", img_info->image_mtime, img_info->image_bytes);
             log_info("\tCache mtime=%u, bytes=%zu, blocks=%zu (%zu bytes)", 
-                    img_info->cache_mtime, img_info->cache_bytes, img_info->cache_blocks, img_info->cache_blocks * 512,
+                    img_info->cache_mtime, img_info->cache_bytes, img_info->cache_blocks, img_info->cache_blocks * 512
             );
         }