}
hyphens = (char*)malloc(wordLength + 5);
+ if(hyphens)
+ {
+ hnj_hyphen_hyphenate2(dict, (char*)(word), wordLength, hyphens, NULL, &rep, &pos, &cut);
- hnj_hyphen_hyphenate2(dict, (char*)(word), wordLength, hyphens, NULL, &rep, &pos, &cut);
+ hyphensList.PushBack(false);
- hyphensList.PushBack(false);
+ for(Length i = 0; i < wordLength - 1; i++)
+ {
+ hyphensList.PushBack((bool)(hyphens[i + 1] & 1));
+ }
- for(Length i = 0; i < wordLength - 1; i++)
- {
- hyphensList.PushBack((bool)(hyphens[i + 1] & 1));
+ free(hyphens);
}
-
- free(hyphens);
#endif
return hyphensList;