Skip to content

Commit

Permalink
Properly decode ChannelState
Browse files Browse the repository at this point in the history
  • Loading branch information
magx2 committed Nov 29, 2024
1 parent bc961d0 commit b4830ef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public ChannelState decode(byte[] bytes, int offset) {
}
offset += INT_SIZE;

int emptySpaceLength = 2;
int emptySpaceLength = 1;
byte[] emptySpace = new byte[emptySpaceLength];
System.arraycopy(bytes, offset, emptySpace, 0, emptySpaceLength);
offset += emptySpaceLength * BYTE_SIZE;
Expand Down Expand Up @@ -129,6 +129,7 @@ public ChannelState decode(byte[] bytes, int offset) {
lightSourceLifespanLeft,
lightSourceOperatingTime,
operatingTime,
(byte) 1,
emptySpace);
}
}

0 comments on commit b4830ef

Please sign in to comment.