datamatrix modifications

This commit is contained in:
Henry Schimke
2022-10-31 16:17:27 -05:00
parent ebe23e1896
commit c8ec9bc7e8
12 changed files with 106 additions and 90 deletions

View File

@@ -33,7 +33,7 @@ impl Encoder for X12Encoder {
Self::encodeChar(c, &mut buffer);
let count = buffer.len();
let count = buffer.chars().count();
if (count % 3) == 0 {
C40Encoder::writeNextTriplet(context, &mut buffer);
@@ -81,7 +81,7 @@ impl X12Encoder {
context.updateSymbolInfo();
let available =
context.getSymbolInfo().unwrap().getDataCapacity() - context.getCodewordCount() as u32;
let count = buffer.len();
let count = buffer.chars().count();
context.pos -= count as u32;
if context.getRemainingCharacters() > 1
|| available > 1