summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker/src/dictionary.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-08 21:09:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-08 21:09:39 +0000
commit861cabec0529cc44e7d8741629bbfa9701dd40ad (patch)
treebab57f5e51b3b6e2c830ebe7bab15af8fdd05fbf /plugins/SpellChecker/src/dictionary.cpp
parent1451c41ce6f6f6921c70bcfe0aea52ae48ffc515 (diff)
- crash fix in hunspell
- warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@3493 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/dictionary.cpp')
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index 88ffde5215..1b36fed403 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -116,19 +116,15 @@ protected:
void toHunspell(char *hunspellWord, const TCHAR *word, size_t hunspellWordLen)
{
-
- WideCharToMultiByte(codePage, 0, word, -1, hunspellWord, hunspellWordLen, NULL, NULL);
-
+ WideCharToMultiByte(codePage, 0, word, -1, hunspellWord, (int)hunspellWordLen, NULL, NULL);
}
TCHAR * fromHunspell(const char *hunspellWord)
{
-
int len = MultiByteToWideChar(codePage, 0, hunspellWord, -1, NULL, 0);
WCHAR *ret = (WCHAR *) malloc((len + 1) * sizeof(WCHAR));
MultiByteToWideChar(codePage, 0, hunspellWord, -1, ret, len + 1);
return ret;
-
}
TCHAR * fromHunspellAndFree(char *hunspellWord)