diff --git a/src/main.c b/src/main.c index 943775a..2098b2e 100644 --- a/src/main.c +++ b/src/main.c @@ -120,6 +120,8 @@ void read_can(Tel *t, int soc) { if (nbytes < 0) return; // -1 EAGAIN means empty + if (nbytes != sizeof(struct can_frame)) return; + if (nbytes > 0) { switch (frame.can_id) {