Skip to content

Commit 8829bc6

Browse files
committed
[bug]:fix can ia period send data length
1 parent f927f37 commit 8829bc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/ipc/uds.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,8 @@ function send(id: string) {
874874
const data = getMessageData(message)
875875
item.socket.write(data).catch(null)
876876
} else {
877-
const b = Buffer.alloc(item.ia.dlc)
877+
const len = getLenByDlc(item.ia.dlc, item.ia.type.includes('fd'))
878+
const b = Buffer.alloc(len)
878879
for (const [index, d] of item.ia.data.entries()) {
879880
b[index] = parseInt(d, 16)
880881
}

0 commit comments

Comments
 (0)