Updated QrCode constructor argument checks in most languages to synchronize logic.

This commit is contained in:
Project Nayuki
2018-10-05 02:27:00 +00:00
parent 06d80aade3
commit b6bbaddf4f
4 changed files with 10 additions and 7 deletions
+2
View File
@@ -77,6 +77,8 @@ var qrcodegen = new function() {
throw "Version value out of range";
if (mask < -1 || mask > 7)
throw "Mask value out of range";
if (!(errCorLvl instanceof Ecc))
throw "QrCode.Ecc expected";
var size = version * 4 + 17;
// Initialize both grids to be size*size arrays of Boolean false