fix crash on input not matching dictionary
This commit is contained in:
parent
5d268b1f36
commit
4f5103f778
2 changed files with 4 additions and 2 deletions
|
|
@ -49,7 +49,9 @@ static void getcost_hira(SJ4_CONTEXT u_char* p, int* len) {
|
||||||
int getcost(SJ4_CONTEXT u_char* p) {
|
int getcost(SJ4_CONTEXT u_char* p) {
|
||||||
char flg = TRUE;
|
char flg = TRUE;
|
||||||
int i;
|
int i;
|
||||||
int result;
|
int result = 0;
|
||||||
|
|
||||||
|
if (!p) return result;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if(p[codesize(*p)] == KANJISTREND) flg = FALSE;
|
if(p[codesize(*p)] == KANJISTREND) flg = FALSE;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ void mkjiritu(SJ4_CONTEXT int mode) {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dic_mu(SJ4_CONTEXT int mode) {
|
dic_mu(SJ4_CONTEXT int mode) {
|
||||||
u_char* tagp;
|
u_char* tagp = NULL;
|
||||||
DICTL* dp;
|
DICTL* dp;
|
||||||
|
|
||||||
for(dp = dictlist; dp; dp = dp->next) {
|
for(dp = dictlist; dp; dp = dp->next) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue