From 7ec06722923d96d2e51300bafb44b920ca341d58 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:49:58 +0100 Subject: ssb unit tests --- src/main/java/org/uic/barcode/ssbFrame/SsbCommonTicketPart.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/org/uic/barcode/ssbFrame/SsbCommonTicketPart.java') diff --git a/src/main/java/org/uic/barcode/ssbFrame/SsbCommonTicketPart.java b/src/main/java/org/uic/barcode/ssbFrame/SsbCommonTicketPart.java index 9512fc1..0a158f3 100644 --- a/src/main/java/org/uic/barcode/ssbFrame/SsbCommonTicketPart.java +++ b/src/main/java/org/uic/barcode/ssbFrame/SsbCommonTicketPart.java @@ -46,14 +46,13 @@ public abstract class SsbCommonTicketPart extends SsbTicketPart { return offset; } - protected int encodeCommonPart(byte[] bytes) { + protected int encodeCommonPart(byte[] bytes, int offset) { BitBuffer bits = new ByteBitBuffer(bytes); - - int offset = 27; // header offset + bits.putInteger(offset,7, numberOfAdults); offset = offset + 7; - bits.putInteger(numberOfChildren,offset, 7); + bits.putInteger(offset, 7, numberOfChildren); offset = offset + 7; bits.put(offset,specimen); offset++; -- cgit v1.2.3