From 2f4b0e8fd8749341c064bc73ab7d2f6fd4bf07a7 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Mon, 5 Nov 2018 04:37:27 +0000 Subject: [PATCH] Tweaked drawFormatBits() and drawDummyFormatBits() to use end-exclusive range in second copy for clarity. --- src/io/nayuki/fastqrcodegen/QrCode.java | 2 +- src/io/nayuki/fastqrcodegen/QrTemplate.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/nayuki/fastqrcodegen/QrCode.java b/src/io/nayuki/fastqrcodegen/QrCode.java index dcd958f..091bec5 100644 --- a/src/io/nayuki/fastqrcodegen/QrCode.java +++ b/src/io/nayuki/fastqrcodegen/QrCode.java @@ -356,7 +356,7 @@ public final class QrCode { setModule(14 - i, 8, getBit(bits, i)); // Draw second copy - for (int i = 0; i <= 7; i++) + for (int i = 0; i < 8; i++) setModule(size - 1 - i, 8, getBit(bits, i)); for (int i = 8; i < 15; i++) setModule(8, size - 15 + i, getBit(bits, i)); diff --git a/src/io/nayuki/fastqrcodegen/QrTemplate.java b/src/io/nayuki/fastqrcodegen/QrTemplate.java index 931d9b0..3ccfb40 100644 --- a/src/io/nayuki/fastqrcodegen/QrTemplate.java +++ b/src/io/nayuki/fastqrcodegen/QrTemplate.java @@ -149,7 +149,7 @@ final class QrTemplate { darkenFunctionModule(14 - i, 8, 0); // Draw second copy - for (int i = 0; i <= 7; i++) + for (int i = 0; i < 8; i++) darkenFunctionModule(size - 1 - i, 8, 0); for (int i = 8; i < 15; i++) darkenFunctionModule(8, size - 15 + i, 0);