diff options
Diffstat (limited to 'apps/talk.c')
-rw-r--r-- | apps/talk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c index 89319ae9a2..c3a1148df4 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -247,6 +247,7 @@ static struct buflib_callbacks talk_ops = { | |||
247 | 247 | ||
248 | static int open_voicefile(void) | 248 | static int open_voicefile(void) |
249 | { | 249 | { |
250 | char fname[MAX_PATH]; | ||
250 | char* p_lang = DEFAULT_VOICE_LANG; /* default */ | 251 | char* p_lang = DEFAULT_VOICE_LANG; /* default */ |
251 | 252 | ||
252 | if ( global_settings.lang_file[0] && | 253 | if ( global_settings.lang_file[0] && |
@@ -255,7 +256,8 @@ static int open_voicefile(void) | |||
255 | p_lang = (char *)global_settings.lang_file; | 256 | p_lang = (char *)global_settings.lang_file; |
256 | } | 257 | } |
257 | 258 | ||
258 | return open_pathfmt(O_RDONLY, LANG_DIR "/%s.voice", p_lang); | 259 | return open_pathfmt(fname, sizeof(fname), |
260 | O_RDONLY, LANG_DIR "/%s.voice", p_lang); | ||
259 | } | 261 | } |
260 | 262 | ||
261 | 263 | ||