diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-07-27 22:23:07 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-07-27 22:23:07 +0000 |
commit | 93f8320aec6e7aa546883ff6cf36039e4e6f4aa5 (patch) | |
tree | 0f5d94dbb4be0b6ab5bfcb514ecfaae51eaaeeba /subreader.c | |
parent | 4feb891da7a4de48fa762b5839e0c12568dc5b03 (diff) | |
download | mpv-93f8320aec6e7aa546883ff6cf36039e4e6f4aa5.tar.bz2 mpv-93f8320aec6e7aa546883ff6cf36039e4e6f4aa5.tar.xz |
fix against dummy solaris sprintf, bug reported by Gotz Waschk
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10487 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r-- | subreader.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/subreader.c b/subreader.c index 3e462d7a97..f23b57baff 100644 --- a/subreader.c +++ b/subreader.c @@ -1694,10 +1694,15 @@ char** sub_filenames(char* path, char *fname) // we have a (likely) subtitle file if (found) { int prio = 0; - sprintf(tmpresult, "%s %s", f_fname_trim, tmp_sub_id); - if (strcmp(tmp_fname_trim, tmpresult) == 0 && sub_match_fuzziness >= 1) { - // matches the movie name + lang extension - prio = 5; + if (tmp_sub_id) + { + sprintf(tmpresult, "%s %s", f_fname_trim, tmp_sub_id); + printf("dvdsublang...%s\n", tmpresult); + if (strcmp(tmp_fname_trim, tmpresult) == 0 && sub_match_fuzziness >= 1) { + // matches the movie name + lang extension + prio = 5; + break; + } } else if (strcmp(tmp_fname_trim, f_fname_trim) == 0) { // matches the movie name prio = 4; |