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) {
|
||||
char flg = TRUE;
|
||||
int i;
|
||||
int result;
|
||||
int result = 0;
|
||||
|
||||
if (!p) return result;
|
||||
|
||||
do {
|
||||
if(p[codesize(*p)] == KANJISTREND) flg = FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue