fix crash on input not matching dictionary

This commit is contained in:
penguin2233 2026-06-25 21:30:34 +10:00
commit 4f5103f778
2 changed files with 4 additions and 2 deletions

View file

@ -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;