From b9cd3188221bb13a04e52c55bc5aff823dd12b89 Mon Sep 17 00:00:00 2001 From: srowen Date: Fri, 2 Mar 2012 18:53:19 +0000 Subject: [PATCH] Issue 1188 fix nudge, to avoid exception in extreme images git-svn-id: https://zxing.googlecode.com/svn/trunk@2210 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- core/src/com/google/zxing/qrcode/QRCodeReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/google/zxing/qrcode/QRCodeReader.java b/core/src/com/google/zxing/qrcode/QRCodeReader.java index 3a9be4e84..c272d030e 100644 --- a/core/src/com/google/zxing/qrcode/QRCodeReader.java +++ b/core/src/com/google/zxing/qrcode/QRCodeReader.java @@ -138,7 +138,7 @@ public class QRCodeReader implements Reader { // Push in the "border" by half the module width so that we start // sampling in the middle of the module. Just in case the image is a // little off, this will help recover. - int nudge = Math.round(moduleSize / 2.0f); + int nudge = (int) (moduleSize / 2.0f); top += nudge; left += nudge;