find_subfiles: fix unintended modification of global filename
commit3b401fb07f04dd1947402550db6702619bbcb5ce
authorUoti Urpala <uau@mplayer2.org>
Wed, 27 Apr 2011 22:06:16 +0000 (28 01:06 +0300)
committerUoti Urpala <uau@mplayer2.org>
Thu, 28 Apr 2011 06:44:37 +0000 (28 09:44 +0300)
treeb3edb7fd1713885ec00b27cc33f865a1d18aea15
parent994b21a80a2f37b0d672526739cb742b87f33ad9
find_subfiles: fix unintended modification of global filename

Commit a2d28010cc ("cleanup: find_subfiles.c: simplify (mainly using
bstr)") was missing a bstrdup() in subtitle search code, and thus the
code erroneously modified the original filename string passed in. As a
result anything which printed or otherwise used the filename after
that would use a lowercase-converted version instead of the actual
file name. Fix by adding the bstrdup() to operate on a local copy of
the name instead.
sub/find_subfiles.c