From 6a14256323f6cb1ed66bba04f3d7ed5c612f179d Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 2 Dec 2020 13:14:04 +0100 Subject: [PATCH] cansniffer: fix snifftab CAN-ID query Due to a wrong test to check for existing CAN-IDs in the snifftab it was not possible to have the CAN-ID '0' in the list and displayed. Signed-off-by: Oliver Hartkopp --- cansniffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cansniffer.c b/cansniffer.c index bd4a5dd..4e9d47d 100644 --- a/cansniffer.c +++ b/cansniffer.c @@ -844,7 +844,7 @@ int sniftab_index(canid_t id) { int i; - for (i = 0; i <= idx; i++) + for (i = 0; i < idx; i++) if (id == sniftab[i].current.can_id) return i;