changeset 10486:f3540688a9ec

fix against dummy solaris sprintf, bug reported by Gotz Waschk
author alex
date Sun, 27 Jul 2003 22:23:07 +0000
parents c09a68c1b949
children 11ec7586a0fe
files subreader.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
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;