From: Bert Vermeulen Date: Tue, 5 Mar 2013 20:31:50 +0000 (+0100) Subject: properly check for result after output module data() X-Git-Tag: sigrok-cli-0.4.0~33 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a172e2a0f496c1b7685d8843ace31ac940f91c21;p=sigrok-cli.git properly check for result after output module data() --- diff --git a/sigrok-cli.c b/sigrok-cli.c index eba6966..bc29317 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -746,7 +746,7 @@ static void datafeed_in(const struct sr_dev_inst *sdi, if (o->format->data && packet->type == o->format->df_type) o->format->data(o, filter_out, filter_out_len, &output_buf, &output_len); - if (output_buf) { + if (output_len) { fwrite(output_buf, 1, output_len, outfile); fflush(outfile); g_free(output_buf);