mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 05:46:19 +00:00
[1.41.15]
Fixes to: announce punctuation ( --punct option) git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@227 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+6
-3
@@ -247,6 +247,12 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)
|
||||
sprintf(fname,"%s%c%s_dict",path_home,PATHSEP,name);
|
||||
size = GetFileLength(fname);
|
||||
|
||||
if(tr->data_dictlist != NULL)
|
||||
{
|
||||
Free(tr->data_dictlist);
|
||||
tr->data_dictlist = NULL;
|
||||
}
|
||||
|
||||
f = fopen(fname,"rb");
|
||||
if((f == NULL) || (size <= 0))
|
||||
{
|
||||
@@ -257,9 +263,6 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)
|
||||
return(1);
|
||||
}
|
||||
|
||||
if(tr->data_dictlist != NULL)
|
||||
Free(tr->data_dictlist);
|
||||
|
||||
tr->data_dictlist = Alloc(size);
|
||||
fread(tr->data_dictlist,size,1,f);
|
||||
fclose(f);
|
||||
|
||||
Reference in New Issue
Block a user