Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
yedajiang44 committed Jun 16, 2024
1 parent f86e943 commit 1173c2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JT809.Protocol/MessagePack/JT809MessagePackReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void Decode(Span<byte> allocateBuffer)
allocateBuffer[offset++] = tmp;
}
Reader = allocateBuffer.Slice(0, offset);
_realCheckCRCCode = (ushort)((Reader[^3] << 8) | Reader[^2]);
_realCheckCRCCode = (ushort)((Reader[Reader.Length - 3] << 8) | Reader[Reader.Length - 2]);
_checkCRCCodeVali = _calculateCheckCRCCode == _realCheckCRCCode;
_decoded = true;
}
Expand Down

0 comments on commit 1173c2b

Please sign in to comment.