From 7d8eee36a52fe39475b63204e74d25cbd538ea56 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 1 May 2018 12:31:32 +0200 Subject: command: fix condition for failure when parsing cycle-value params Could make it behave differently (and leak memory) in certain cases. Basically, m_option_parse() randomly returns 0 or 1, but most time 1, with the difference due to legacy reasons that don't matter anymore. --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/command.c b/player/command.c index b15fd7ff80..cc8b609c50 100644 --- a/player/command.c +++ b/player/command.c @@ -4797,7 +4797,7 @@ static void cmd_cycle_values(void *p) for (int n = first; n < cmd->num_args; n++) { union m_option_value val = {0}; if (m_option_parse(mpctx->log, &prop, bstr0(name), - bstr0(cmd->args[n].v.s), &val) <= 0) + bstr0(cmd->args[n].v.s), &val) < 0) continue; if (compare_values(&prop, &curval, &val)) -- cgit v1.2.3