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.
This commit is contained in:
Reece H. Dunn
2018-03-22 19:48:56 +00:00
parent bb19c7a336
commit b24db06a84
+2 -1
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