Added an assertion to QrCode.getNumRawDataModules() in all language versions.

This commit is contained in:
Project Nayuki
2019-09-13 04:09:42 +00:00
parent 585e80e4f5
commit 6e088f72d3
6 changed files with 8 additions and 0 deletions
+2
View File
@@ -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;
}