Skip to content

Conversation

@MrZ626
Copy link
Contributor

@MrZ626 MrZ626 commented Dec 1, 2025

Now it throws an error saying "too long input data"

…range_codewords_and_calculate_ec` function

also fix a potential inf loop, though it probably cannot reach here so far after previous fixing commit
@MrZ626
Copy link
Contributor Author

MrZ626 commented Dec 1, 2025

sorry for finding a bug (?) just after I thought everything finished lol

@pgundlach
Copy link
Member

Do you have an example for a "too long" string? Perhaps it is worth putting in the blackbox data?

@MrZ626
Copy link
Contributor Author

MrZ626 commented Dec 2, 2025

("z"):rep(2953) works, ("z"):rep(2954) fails

  • in old version, 2953 have output, 2954 inf loop
  • after my fix, 2953 have output, 2954 error

edge case passed, so I think this is a correct implementaion

@pgundlach
Copy link
Member

Possible commit message, please change if you see anything wrong with it:

Fail fast on oversize QR data and simplify block weaving

- assert when no QR version fits instead of looping forever
- inline xor lookup usage and adjust tests
- streamline data/EC interleaving; add max-length blackbox case

@pgundlach pgundlach merged commit 5a9c34b into speedata:master Dec 2, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants