diff options
author | wm4 <wm4@nowhere> | 2018-05-01 12:31:32 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-05-03 01:20:01 +0300 |
commit | 7d8eee36a52fe39475b63204e74d25cbd538ea56 (patch) | |
tree | 169074244ead790d262fe1bbf026e2f93c5f4191 /player/command.c | |
parent | 78fe41f2462ae7e92eb68a9173082d561354b808 (diff) | |
download | mpv-7d8eee36a52fe39475b63204e74d25cbd538ea56.tar.bz2 mpv-7d8eee36a52fe39475b63204e74d25cbd538ea56.tar.xz |
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.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |