summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-08-07 17:22:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-08-07 17:22:43 -0400
commit31310841afd7c969c4a9a57a6f49172f1f5a8b93 (patch)
tree3511d15bcfc5590101167d8c303a16a212d59b02
parentf4481d9956fa8e3f3022bedaea07a37c02ad6b22 (diff)
downloadkd-forest-31310841afd7c969c4a9a57a6f49172f1f5a8b93.tar.xz
Fix off-by-one in stripe code.
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index bf4fe75..d255515 100644
--- a/main.c
+++ b/main.c
@@ -400,7 +400,7 @@ generate_bitmap(state_t *state)
// Do multiple passes to get rid of artifacts in HUE_SORT mode
unsigned int bit_depth = state->options->bit_depth;
- for (unsigned int i = 1, progress = 0; i <= bit_depth; ++i) {
+ for (unsigned int i = 1, progress = 0; i <= bit_depth + 1; ++i) {
unsigned int stripe = 1 << i;
for (unsigned int j = stripe/2 - 1; j < state->size; j += stripe, ++progress) {