Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect range of timing patterns #60

Open
ksrnnb opened this issue Nov 12, 2022 · 0 comments
Open

incorrect range of timing patterns #60

ksrnnb opened this issue Nov 12, 2022 · 0 comments

Comments

@ksrnnb
Copy link

ksrnnb commented Nov 12, 2022

Last iteration m.size-finderPatternSize-1 for adding timing pattern is on separator pattern.
It happens to be false, but it seems to be a misunderstanding.

I think it should be for i := finderPatternSize + 1; i < m.size-finderPatternSize-1; i++ {.

go-qrcode/regular_symbol.go

Lines 172 to 181 in da1b656

func (m *regularSymbol) addTimingPatterns() {
value := true
for i := finderPatternSize + 1; i < m.size-finderPatternSize; i++ {
m.symbol.set(i, finderPatternSize-1, value)
m.symbol.set(finderPatternSize-1, i, value)
value = !value
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant