From 99e264892acc0d81b31a219d806a5e5c5efa46f8 Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Sun, 24 Nov 2019 19:37:49 +0100 Subject: decoder: accept skip count 0 (onewire_link, usb_signalling) A recent commit tightened the check for acceptable 'skip' sample counts. This broke the onewire_link and usb_signalling decoders' test sequences, which no longer pass with a minimum count of one. Relax the condition and accept a count of zero. This breaks gpib again for low total sample count option values, but this needs to get addressed differently. --- type_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/type_decoder.c b/type_decoder.c index 454e7ea..c097c7f 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -677,7 +677,7 @@ static int create_term_list(struct srd_decoder_inst *di, term->type = SRD_TERM_SKIP; term->num_samples_to_skip = num_samples_to_skip; term->num_samples_already_skipped = 0; - if (num_samples_to_skip < 1) + if (num_samples_to_skip < 0) term->type = SRD_TERM_ALWAYS_FALSE; } else { srd_err("Term key is neither a string nor a number."); -- cgit v1.2.3-70-g09d2