mirror of
https://github.com/openharmony/third_party_qrcodegen.git
synced 2026-07-16 08:14:28 -04:00
Added an assertion to QrCode.getNumRawDataModules() in all language versions.
This commit is contained in:
@@ -531,6 +531,8 @@ int QrCode::getNumRawDataModules(int ver) {
|
||||
if (ver >= 7)
|
||||
result -= 36;
|
||||
}
|
||||
if (!(208 <= result && result <= 29648))
|
||||
throw std::logic_error("Assertion error");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user