diff options
author | Reuben Thomas <rrt@sc3d.org> | 2021-09-20 20:32:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 20:32:50 +0100 |
commit | ff5e31d0535ba93f27010a6b1ac50e87252bd759 (patch) | |
tree | 65be97801a6e4b5730828e6cb217dac158fc5027 | |
parent | 62fc8ea38ed3ef1dcfc448e250b10896799d3491 (diff) | |
parent | 56dcba411363ff6a163f125c9b8e3a350bbbc130 (diff) | |
download | enchant-ff5e31d0535ba93f27010a6b1ac50e87252bd759.tar.gz |
Merge pull request #282 from Biswa96/mingw-strndup
voikko: Fix undefined strndup in Win32/MinGW
-rw-r--r-- | providers/enchant_voikko.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/enchant_voikko.c b/providers/enchant_voikko.c index 78ca098..137de8f 100644 --- a/providers/enchant_voikko.c +++ b/providers/enchant_voikko.c @@ -50,7 +50,7 @@ static int voikko_dict_check (EnchantDict * me, const char *const word, size_t len) { - char *word_nul = strndup(word, len); + char *word_nul = g_strndup(word, len); int result = voikkoSpellCstr((struct VoikkoHandle *)me->user_data, word_nul); free(word_nul); if (result == VOIKKO_SPELL_FAILED) @@ -65,7 +65,7 @@ static char ** voikko_dict_suggest (EnchantDict * me, const char *const word, size_t len, size_t * out_n_suggs) { - char *word_nul = strndup(word, len); + char *word_nul = g_strndup(word, len); char **voikko_sugg_arr = voikkoSuggestCstr((struct VoikkoHandle *)me->user_data, word_nul); free(word_nul); if (voikko_sugg_arr == NULL) |