fixed bug in calcPenaltyRule1

This commit is contained in:
Florian Sundermann 2013-12-12 14:04:36 +01:00
parent 49e4105259
commit 0ab1322172
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ func (qr *qrcode) calcPenaltyRule1() uint {
if cntX >= 5 { if cntX >= 5 {
result += cntX - 2 result += cntX - 2
} }
cntX = 0 cntX = 1
} }
if qr.Get(y, x) == checkForY { if qr.Get(y, x) == checkForY {
@ -74,7 +74,7 @@ func (qr *qrcode) calcPenaltyRule1() uint {
if cntY >= 5 { if cntY >= 5 {
result += cntY - 2 result += cntY - 2
} }
cntY = 0 cntY = 1
} }
} }