]> sigrok.org Git - libsigrok.git/commit
srzip: Fix handling of analog channels with index 0
authorLars-Peter Clausen <redacted>
Thu, 28 Apr 2016 15:43:15 +0000 (17:43 +0200)
committerUwe Hermann <redacted>
Fri, 13 May 2016 23:02:00 +0000 (01:02 +0200)
commit9906dbf5a4f26e630b76e8f56e80d6b085b90446
tree8edc46777682c30aacf0e2ff6c7735f4985becd6
parent4def782b6e545a91fc7e0cf9f4468e8f56c0d3a6
srzip: Fix handling of analog channels with index 0

0 is a valid index for a channel. Using it as the value for the terminating
entry of analog_index_map causes zip_append_analog() to falsely assume that
no channel was found when a packet for a channel with index 0 was received.
This prevents the data for the channel to be added to the sigrok session
file.

Instead use -1, which is not a valid channel index, as
the terminating entry value.

Signed-off-by: Lars-Peter Clausen <redacted>
src/output/srzip.c