From d4dd2cacca4df497064e04d659de9090698973ee Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Wed, 6 Jan 2016 20:27:29 +0000 Subject: [PATCH] Fix the voice_dir logic in LoadVoice(voices.c) [clang scan-build] --- src/libespeak-ng/voices.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libespeak-ng/voices.c b/src/libespeak-ng/voices.c index e5521aa4..32a08e6d 100644 --- a/src/libespeak-ng/voices.c +++ b/src/libespeak-ng/voices.c @@ -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); } } }