Fix the voice_dir logic in LoadVoice(voices.c) [clang scan-build]

This commit is contained in:
Reece H. Dunn
2016-01-06 20:27:29 +00:00
parent cb3699746c
commit d4dd2cacca
+5 -5
View File
@@ -577,13 +577,13 @@ voice_t *LoadVoice(const char *vname, int control)
voice_dir = "asia";
else
voice_dir = "other";
}
sprintf(buf, "%s%s%c%s", path_voices, voice_dir, PATHSEP, voicename);
sprintf(buf, "%s%s%c%s", path_voices, voice_dir, PATHSEP, voicename);
if (GetFileLength(buf) <= 0) {
// if not found, look in "test" sub-directory
sprintf(buf, "%stest%c%s", path_voices, PATHSEP, voicename);
}
if (GetFileLength(buf) <= 0) {
// if not found, look in "test" sub-directory
sprintf(buf, "%stest%c%s", path_voices, PATHSEP, voicename);
}
}
}