Skip to content

Commit

Permalink
WriteBarcode: fix copy'n'paste bug in WriteBarcodeToUtf8()
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel committed Apr 25, 2024
1 parent 092047c commit 050fed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/WriteBarcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ std::string WriteBarcodeToUtf8(const Barcode& barcode, [[maybe_unused]] const Wr
for (int y = 0; y < iv.height(); y += 2) {
for (int x = 0; x < iv.width(); ++x) {
int tp = bool(*iv.data(x, y)) ^ inverted;
int bt = (iv.height() == 1 && tp) || (y + 1 < iv.height() && (bool(*iv.data(x, y)) ^ inverted));
int bt = (iv.height() == 1 && tp) || (y + 1 < iv.height() && (bool(*iv.data(x, y + 1)) ^ inverted));
res << map[tp | (bt << 1)];
}
res << '\n';
Expand Down

0 comments on commit 050fed2

Please sign in to comment.