diff --git a/SlnMesnac.TouchSocket/BufferDataAnalysis.cs b/SlnMesnac.TouchSocket/BufferDataAnalysis.cs index 3836c54..f86339b 100644 --- a/SlnMesnac.TouchSocket/BufferDataAnalysis.cs +++ b/SlnMesnac.TouchSocket/BufferDataAnalysis.cs @@ -19,6 +19,10 @@ namespace SlnMesnac.TouchSocket { TcpVisionEntity entity; //数据校验,从起始符开始到数据位,按字节求和得出的结果对256求余 + if(bytes.Length <= 2) + { + return null; + } int checkDatalength = bytes.Length - 2; byte checksum = bytes[checkDatalength]; byte[] checkData = new byte[checkDatalength]; diff --git a/SlnMesnac.WPF/appsettings.json b/SlnMesnac.WPF/appsettings.json index 95b9835..b7b7e0f 100644 --- a/SlnMesnac.WPF/appsettings.json +++ b/SlnMesnac.WPF/appsettings.json @@ -8,7 +8,7 @@ }, "AllowedHosts": "*", "AppConfig": { - "logPath": "F:\\Mesnac\\2023部门项目\\机场AGV调度\\HightWay_AirPot_WCS\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\log", + "logPath": "D:\\WorkCode\\AirPortWCS\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\log", "SqlConfig": [ //{ // "configId": "mes",