Browse Source

Use wflags to access wtab->flags in LookupDict2.

Clang static analysis reports a 'Dereference of null pointer'
error when accessing wtab->flags. This is properly guarded
against when setting the wflags variable, so use that variable
instead.
master
Reece H. Dunn 7 years ago
parent
commit
8a777385a8
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/dictionary.c

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

@@ -2719,7 +2719,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
continue;
}

if ((dictionary_flags2 & FLAG_ATSTART) && !(wtab->flags & FLAG_FIRST_WORD)) {
if ((dictionary_flags2 & FLAG_ATSTART) && !(wflags & FLAG_FIRST_WORD)) {
// only use this pronunciation if it's the first word of a clause
continue;
}

Loading…
Cancel
Save