summaryrefslogtreecommitdiff
path: root/external/hunspell/hunspell-fdo48017-wfopen.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/hunspell/hunspell-fdo48017-wfopen.patch')
-rw-r--r--external/hunspell/hunspell-fdo48017-wfopen.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/external/hunspell/hunspell-fdo48017-wfopen.patch b/external/hunspell/hunspell-fdo48017-wfopen.patch
index e3581062752e..37203be5c3f9 100644
--- a/external/hunspell/hunspell-fdo48017-wfopen.patch
+++ b/external/hunspell/hunspell-fdo48017-wfopen.patch
@@ -13,7 +13,7 @@ diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
#ifdef OPENOFFICEORG
# include <unicode/uchar.h>
#else
-@@ -46,6 +50,26 @@
+@@ -51,6 +51,26 @@
static struct unicode_info2 * utf_tbl = NULL;
static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances
@@ -24,11 +24,11 @@ diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
+ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
+ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
+ wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
-+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
+ FILE * f = NULL;
++ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
+ if (_wfullpath( buff2, buff, len ) != NULL) {
+ f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
-+ }
++ }
+ free(buff);
+ free(buff2);
+ return f;