From e91d0a58612a01954687d34c7417cf0fbd3cadaa Mon Sep 17 00:00:00 2001 From: Juho Hiltunen Date: Fri, 30 Jul 2021 17:18:47 +0300 Subject: [PATCH] code cleanup: don't add a \0 to voices_language in LoadVoice(). This is unnecessary since the string is already null terminated in the V_LANGUAGE switch case. sscanf creates a null terminated string in language_name, which is then copied to voice_language by strcpy (keeping the \0). --- src/libespeak-ng/voices.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libespeak-ng/voices.c b/src/libespeak-ng/voices.c index 885a8f9b..2276c602 100644 --- a/src/libespeak-ng/voices.c +++ b/src/libespeak-ng/voices.c @@ -959,8 +959,6 @@ voice_t *LoadVoice(const char *vname, int control) return NULL; // no dictionary loaded } } - - voice_languages[langix] = 0; } return voice;