From: Aurelien Jacobs Date: Sun, 20 Sep 2015 14:18:18 +0000 (+0200) Subject: scpi: don't stop parsing table at command 0 which is a valid command X-Git-Tag: libsigrok-0.4.0~275 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=485a285abea07fa296ee56517cf95b4dbab69e29;hp=06f63a749ea15ae88e8183404a0d6e3d1fd85de3;p=libsigrok.git scpi: don't stop parsing table at command 0 which is a valid command command 0 is SCPI_CMD_REMOTE --- diff --git a/src/scpi/helpers.c b/src/scpi/helpers.c index c686390f..4e4796fc 100644 --- a/src/scpi/helpers.c +++ b/src/scpi/helpers.c @@ -55,7 +55,7 @@ SR_PRIV const char *scpi_cmd_get(const struct scpi_command *cmdtable, int comman return NULL; cmd = NULL; - for (i = 0; cmdtable[i].command; i++) { + for (i = 0; cmdtable[i].string; i++) { if (cmdtable[i].command == command) { cmd = cmdtable[i].string; break;