From b7922a8dce1006cb98dd00a8b13756d738e0e1c2 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Sat, 6 Oct 2018 04:48:47 +0000 Subject: [PATCH] Tweaked code slightly. --- java/io/nayuki/qrcodegen/QrSegment.java | 2 +- typescript/qrcodegen.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }