diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2019-11-24 19:37:49 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-11-24 20:41:54 +0100 |
commit | 99e264892acc0d81b31a219d806a5e5c5efa46f8 (patch) | |
tree | 03f112a8f55f76db59333cb00379fccdd67cc2a9 | |
parent | 1cb40e1077894db4c92cfa01b285e28b202cce6f (diff) | |
download | libsigrokdecode-99e264892acc0d81b31a219d806a5e5c5efa46f8.tar.gz libsigrokdecode-99e264892acc0d81b31a219d806a5e5c5efa46f8.zip |
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.
-rw-r--r-- | type_decoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
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."); |