Fixed substring call

This commit is contained in:
Marcus Winkler 2015-07-02 16:45:16 +02:00
parent 849f81354c
commit e31ac261e3

View file

@ -215,7 +215,7 @@ final class PDF417HighLevelEncoder {
if (b == 0) {
b = 1;
}
byte[] bytes = msg.substring(p, b).getBytes(encoding);
byte[] bytes = msg.substring(p, p + b).getBytes(encoding);
if (bytes.length == 1 && encodingMode == TEXT_COMPACTION) {
//Switch for one byte (instead of latch)
encodeBinary(bytes, 0, 1, TEXT_COMPACTION, sb);