diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-31 20:25:22 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-31 20:25:22 +0300 |
commit | ce112e0789b337490d686c80e76fc37f2a4bfe35 (patch) | |
tree | b90228c124e3af21beb52abed82f7bdaef1cbbfa /bstr.c | |
parent | 9d25699c5831c5188968c8ed69d32a5d534b8ff6 (diff) | |
download | mpv-ce112e0789b337490d686c80e76fc37f2a4bfe35.tar.bz2 mpv-ce112e0789b337490d686c80e76fc37f2a4bfe35.tar.xz |
options: fix failure to parse trailing ',' in string list
A trailing separator in string list options was ignored after recent
commit e873d703e9 ("options: change option parsing to use bstr"),
which broke uses such as "-vo vdpau,". Fix.
Diffstat (limited to 'bstr.c')
-rw-r--r-- | bstr.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -129,8 +129,7 @@ struct bstr bstr_splice(struct bstr str, int start, int end) end += str.len; end = FFMIN(end, str.len); start = FFMAX(start, 0); - if (start >= end) - return (struct bstr){NULL, 0}; + end = FFMAX(end, start); str.start += start; str.len = end - start; return str; |