Browse Source

Copy name to tr->dictionary_name if not equal

This is a similar change to b60d2452c3.
In this case, it is when tr->dictionary_name is passed as the name
parameter in LoadDictionary.

This happens in the SetTranslator2 function when loading the
dictionary for the second language translator object.
master
Reece H. Dunn 7 years ago
parent
commit
b24db06a84
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/libespeak-ng/dictionary.c

+ 2
- 1
src/libespeak-ng/dictionary.c View File

@@ -214,7 +214,8 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)

if (dictionary_name != name)
strncpy(dictionary_name, name, 40); // currently loaded dictionary name
strncpy(tr->dictionary_name, name, 40);
if (tr->dictionary_name != name)
strncpy(tr->dictionary_name, name, 40);

// Load a pronunciation data file into memory
// bytes 0-3: offset to rules data

Loading…
Cancel
Save