diff --git a/qr/qrcode.go b/qr/qrcode.go index 14f956d..fc9f4f1 100644 --- a/qr/qrcode.go +++ b/qr/qrcode.go @@ -64,7 +64,7 @@ func (qr *qrcode) calcPenaltyRule1() uint { if cntX >= 5 { result += cntX - 2 } - cntX = 0 + cntX = 1 } if qr.Get(y, x) == checkForY { @@ -74,7 +74,7 @@ func (qr *qrcode) calcPenaltyRule1() uint { if cntY >= 5 { result += cntY - 2 } - cntY = 0 + cntY = 1 } }