diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index efe2900..5c6835a 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -95,7 +95,7 @@ var qrcodegen = new function() { var allCodewords = addEccAndInterleave(dataCodewords); drawCodewords(allCodewords); - // Handle masking + // Do masking if (mask == -1) { // Automatically choose best mask var minPenalty = Infinity; for (var i = 0; i < 8; i++) { @@ -113,6 +113,7 @@ var qrcodegen = new function() { throw "Assertion error"; drawFormatBits(mask); // Overwrite old format bits applyMask(mask); // Apply the final choice of mask + isFunction = null; diff --git a/python/qrcodegen.py b/python/qrcodegen.py index dbbd5d3..0313f15 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -176,7 +176,7 @@ class QrCode(object): allcodewords = self._add_ecc_and_interleave(datacodewords) self._draw_codewords(allcodewords) - # Handle masking + # Do masking if mask == -1: # Automatically choose best mask minpenalty = 1 << 32 for i in range(8): @@ -191,6 +191,7 @@ class QrCode(object): self._draw_format_bits(mask) # Overwrite old format bits self._apply_mask(mask) # Apply the final choice of mask self._mask = mask + del self._isfunction diff --git a/typescript/qrcodegen.ts b/typescript/qrcodegen.ts index fbe04ad..52d8cec 100644 --- a/typescript/qrcodegen.ts +++ b/typescript/qrcodegen.ts @@ -181,7 +181,7 @@ namespace qrcodegen { let allCodewords: Array = this.addEccAndInterleave(dataCodewords); this.drawCodewords(allCodewords); - // Handle masking + // Do masking if (mask == -1) { // Automatically choose best mask let minPenalty: int = 1000000000; for (let i = 0; i < 8; i++) { @@ -200,6 +200,7 @@ namespace qrcodegen { this.mask = mask; this.drawFormatBits(mask); // Overwrite old format bits this.applyMask(mask); // Apply the final choice of mask + this.isFunction = []; }