Mercurial > mplayer.hg
diff subreader.c @ 10486:f3540688a9ec
fix against dummy solaris sprintf, bug reported by Gotz Waschk
author | alex |
---|---|
date | Sun, 27 Jul 2003 22:23:07 +0000 |
parents | 2d3f6a2996da |
children | db0bc96da95f |
line wrap: on
line diff
--- a/subreader.c Sun Jul 27 22:20:15 2003 +0000 +++ b/subreader.c Sun Jul 27 22:23:07 2003 +0000 @@ -1694,10 +1694,15 @@ // 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;