From: Bert Vermeulen Date: Fri, 29 Aug 2014 21:02:19 +0000 (+0200) Subject: Fix session file loading. X-Git-Tag: sigrok-cli-0.6.0~71 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=11c747bd45fd415e35a6c054fe22beb3443e05ad;p=sigrok-cli.git Fix session file loading. --- diff --git a/input.c b/input.c index c4f41bf..eb73d05 100644 --- a/input.c +++ b/input.c @@ -143,7 +143,7 @@ void load_input_file(void) GSList *devices; int ret; - if (strcmp(opt_input_file, "-") || sr_session_load(opt_input_file, &session) == SR_OK) { + if (strcmp(opt_input_file, "-") && sr_session_load(opt_input_file, &session) == SR_OK) { /* sigrok session file */ ret = sr_session_dev_list(session, &devices); if (ret != SR_OK || !devices->data) { @@ -160,8 +160,7 @@ void load_input_file(void) sr_session_start(session); sr_session_run(session); sr_session_stop(session); - } - else { + } else { /* fall back on input modules */ load_input_file_module(); }