Ver código fonte

fix buffer split

dujunchen 1 semana atrás
pai
commit
d9da5a386c
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      internal/app/stc/data/msgdata.go

+ 1 - 1
internal/app/stc/data/msgdata.go

@@ -131,7 +131,7 @@ func ExtractPacket(buf *bytes.Buffer) ([]byte, error) {
 
 	// 查找起始标记 0x7f 0x83 0x9d
 	for i := 0; i < len(data)-2; i++ {
-		if data[i] == 0x7f && data[i+1] == 0x83 && data[i+2] == 0x9d {
+		if data[i] == 0x7f && data[i+1] == 0x8e && data[i+2] == 0x9d {
 			startIdx = i
 			break
 		}