diff --git a/java/io/nayuki/qrcodegen/QrSegment.java b/java/io/nayuki/qrcodegen/QrSegment.java index dc0cd30..9f9c74c 100644 --- a/java/io/nayuki/qrcodegen/QrSegment.java +++ b/java/io/nayuki/qrcodegen/QrSegment.java @@ -173,7 +173,7 @@ public final class QrSegment { * Always zero or positive. Not the same as the data's bit length. */ public final int numChars; - /** The data bits of this segment. Not {@code null}. Accessed through {@link getBits()}. */ + /** The data bits of this segment. Not {@code null}. Accessed through {@link #getBits()}. */ final BitBuffer data; diff --git a/typescript/qrcodegen.ts b/typescript/qrcodegen.ts index 20d9869..a1a6987 100644 --- a/typescript/qrcodegen.ts +++ b/typescript/qrcodegen.ts @@ -808,7 +808,7 @@ namespace qrcodegen { let ccbits: int = seg.mode.numCharCountBits(version); if (seg.numChars >= (1 << ccbits)) return Infinity; // The segment's length doesn't fit the field's bit width - result += 4 + ccbits + seg.getBits().length; + result += 4 + ccbits + seg.bitData.length; } return result; }