X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fmic-985xx%2Fprotocol.c;h=5f2825e65b740103d56e101f052cb4fa85497704;hb=82b904b173f1443c4d6bdebdf1a7f0dda01c4982;hp=828a91cc24084a7f02e17b63a0564cfcc2cd747e;hpb=6f3e5335adc5ba4488c5f7dcb791f929c20f2049;p=libsigrok.git diff --git a/hardware/mic-985xx/protocol.c b/hardware/mic-985xx/protocol.c index 828a91cc..5f2825e6 100644 --- a/hardware/mic-985xx/protocol.c +++ b/hardware/mic-985xx/protocol.c @@ -108,6 +108,9 @@ static int handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi, int idx) return SR_ERR; } + /* Clear 'analog', otherwise it'll contain random garbage. */ + memset(&analog, 0, sizeof(struct sr_datafeed_analog)); + /* Common values for both probes. */ packet.type = SR_DF_ANALOG; packet.payload = &analog;