fix: 修复2字节时小端模式失效问题

This commit is contained in:
zhouhao 2024-03-28 15:12:22 +08:00
parent 0f874dd4fb
commit cf2c781414
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View File

@ -28,4 +28,5 @@ docker/data
!device-simulator.jar !device-simulator.jar
!demo-protocol-1.0.jar !demo-protocol-1.0.jar
application-local.yml application-local.yml
dev/ dev/
.DS_Store

View File

@ -46,7 +46,7 @@ public class LengthFieldPayloadParserBuilder implements PayloadParserBuilderStra
break; break;
case 2: case 2:
lengthParser = lengthParser =
le ? buffer -> buffer.getUnsignedShort(offset) le ? buffer -> buffer.getUnsignedShortLE(offset)
: buffer -> buffer.getUnsignedShort(offset); : buffer -> buffer.getUnsignedShort(offset);
break; break;
case 3: case 3: