Added an assertion check to C++ code.

This commit is contained in:
Nayuki Minase 2016-04-21 02:31:09 +00:00
parent 7622a9d799
commit def528043e
1 changed files with 2 additions and 0 deletions

View File

@ -334,6 +334,8 @@ std::vector<uint8_t> qrcodegen::QrCode::appendErrorCorrection(const std::vector<
result.push_back(blocks.at(j).at(i));
}
}
if (result.size() != static_cast<unsigned int>(getNumRawDataModules(version) / 8))
throw "Assertion error";
return result;
}