diff --git a/c/qrcodegen.c b/c/qrcodegen.c index 76876cf..31ea560 100644 --- a/c/qrcodegen.c +++ b/c/qrcodegen.c @@ -253,7 +253,7 @@ testable int getNumRawDataModules(int version) { int numAlign = version / 7 + 2; result -= (25 * numAlign - 10) * numAlign - 55; if (version >= 7) - result -= 18 * 2; // Subtract version information + result -= 36; } return result; } diff --git a/cpp/QrCode.cpp b/cpp/QrCode.cpp index bb8e979..273056a 100644 --- a/cpp/QrCode.cpp +++ b/cpp/QrCode.cpp @@ -520,7 +520,7 @@ int QrCode::getNumRawDataModules(int ver) { int numAlign = ver / 7 + 2; result -= (25 * numAlign - 10) * numAlign - 55; if (ver >= 7) - result -= 18 * 2; // Subtract version information + result -= 36; } return result; } diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 27cbc0c..fc3d5bd 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -628,7 +628,7 @@ var qrcodegen = new function() { var numAlign = Math.floor(ver / 7) + 2; result -= (25 * numAlign - 10) * numAlign - 55; if (ver >= 7) - result -= 18 * 2; // Subtract version information + result -= 36; } return result; }; diff --git a/python/qrcodegen.py b/python/qrcodegen.py index 130f832..d2f07c1 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -515,7 +515,7 @@ class QrCode(object): numalign = ver // 7 + 2 result -= (25 * numalign - 10) * numalign - 55 if ver >= 7: - result -= 18 * 2 # Subtract version information + result -= 36 return result diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 486896f..78b2d2a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -649,7 +649,7 @@ impl QrCode { let numalign: usize = (ver as usize) / 7 + 2; result -= (25 * numalign - 10) * numalign - 55; if ver >= 7 { - result -= 18 * 2; // Subtract version information + result -= 36; } } result diff --git a/typescript/qrcodegen.ts b/typescript/qrcodegen.ts index 73f03a3..de554a3 100644 --- a/typescript/qrcodegen.ts +++ b/typescript/qrcodegen.ts @@ -591,7 +591,7 @@ namespace qrcodegen { let numAlign: int = Math.floor(ver / 7) + 2; result -= (25 * numAlign - 10) * numAlign - 55; if (ver >= 7) - result -= 18 * 2; // Subtract version information + result -= 36; } return result; }