mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Added robustness checks to JavaScript, Python, C++ code without changing functionality in normal operation.
This commit is contained in:
+1
-1
@@ -348,7 +348,7 @@ void qrcodegen::QrCode::drawCodewords(const std::vector<uint8_t> &data) {
|
||||
bool upwards = ((right & 2) == 0) ^ (x < 6);
|
||||
int y = upwards ? size - 1 - vert : vert; // Actual y coordinate
|
||||
if (!isFunction.at(y).at(x) && i < data.size() * 8) {
|
||||
modules.at(y).at(x) = ((data[i >> 3] >> (7 - (i & 7))) & 1) != 0;
|
||||
modules.at(y).at(x) = ((data.at(i >> 3) >> (7 - (i & 7))) & 1) != 0;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user