hunspell/hashmgr-add-word.patch

14 lines
659 B
Diff

Index: hunspell-1.3.2/src/hunspell/hashmgr.cxx
===================================================================
--- hunspell-1.3.2.orig/src/hunspell/hashmgr.cxx
+++ hunspell-1.3.2/src/hunspell/hashmgr.cxx
@@ -116,7 +116,7 @@ int HashMgr::add_word(const char * word,
int al, const char * desc, bool onlyupcase)
{
bool upcasehomonym = false;
- int descl = desc ? (aliasm ? sizeof(short) : strlen(desc) + 1) : 0;
+ int descl = desc ? (aliasm ? sizeof(char *) : strlen(desc) + 1) : 0;
// variable-length hash record with word and optional fields
struct hentry* hp =
(struct hentry *) malloc (sizeof(struct hentry) + wbl + descl);