Skip to content

Commit

Permalink
Fix create_bytes data concatenation
Browse files Browse the repository at this point in the history
Fixes #304
  • Loading branch information
mattiasj-axis committed Feb 1, 2023
1 parent a3b9a24 commit 2ab3467
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions qrcode/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,14 +538,12 @@ def create_bytes(buffer: BitBuffer, rs_blocks: List[RSBlock]):
data = []
for i in range(maxDcCount):
for dc in dcdata:
if i >= len(dc):
break
data.append(dc[i])
if i < len(dc):
data.append(dc[i])
for i in range(maxEcCount):
for ec in ecdata:
if i >= len(ec):
break
data.append(ec[i])
if i < len(ec):
data.append(ec[i])

return data

Expand Down

0 comments on commit 2ab3467

Please sign in to comment.