diff --git a/typescript-javascript/qrcodegen.ts b/typescript-javascript/qrcodegen.ts index 809622b..dece093 100644 --- a/typescript-javascript/qrcodegen.ts +++ b/typescript-javascript/qrcodegen.ts @@ -545,7 +545,7 @@ namespace qrcodegen { else { const numAlign: int = Math.floor(this.version / 7) + 2; const step: int = (this.version == 32) ? 26 : - Math.ceil((this.size - 13) / (numAlign * 2 - 2)) * 2; + Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2; let result: Array = [6]; for (let pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);