Browse Source

Don't use pw when reading the replacement data.

master
Reece H. Dunn 7 years ago
parent
commit
0e91fcbc04
1 changed files with 5 additions and 6 deletions
  1. 5
    6
      src/libespeak-ng/dictionary.c

+ 5
- 6
src/libespeak-ng/dictionary.c View File

int ix; int ix;
char *p; char *p;
char *p_name; char *p_name;
unsigned int *pw;
unsigned char c, c2; unsigned char c, c2;
int len; int len;


p++; p++;


if (p[0] == RULE_REPLACEMENTS) { if (p[0] == RULE_REPLACEMENTS) {
pw = (unsigned int *)(((intptr_t)p+4) & ~3); // advance to next word boundary
tr->langopts.replace_chars = pw;
while (pw[0] != 0)
pw += 2; // find the end of the replacement list, each entry is 2 words.
p = (char *)(pw+1);
p = (char *)(((intptr_t)p+4) & ~3); // advance to next word boundary
tr->langopts.replace_chars = (unsigned int *)p;
while (*(unsigned int *)p != 0)
p += 8; // find the end of the replacement list, each entry is 2 words.
p += 4;


#ifdef ARCH_BIG #ifdef ARCH_BIG
pw = (unsigned int *)(tr->langopts.replace_chars); pw = (unsigned int *)(tr->langopts.replace_chars);

Loading…
Cancel
Save