diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-07-20 08:01:05 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-07-20 08:01:05 +0000 |
commit | d5dfa90eec9c108f86b9a0aa3f746a5b164c6649 (patch) | |
tree | e6eb1ae6ca89db58494b28d6c5124ea94c517c37 /plugins/SpellChecker/src/hunspell/phonet.cxx | |
parent | 42c1d344fd105bcc25ae35e5a82d16a978b302c4 (diff) |
SpellChecker:
-Updated Hunspell to 1.3.3
-Create services in Load()
git-svn-id: http://svn.miranda-ng.org/main/trunk@9876 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/hunspell/phonet.cxx')
-rw-r--r-- | plugins/SpellChecker/src/hunspell/phonet.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/SpellChecker/src/hunspell/phonet.cxx b/plugins/SpellChecker/src/hunspell/phonet.cxx index 6e2e56297f..192bfe2d69 100644 --- a/plugins/SpellChecker/src/hunspell/phonet.cxx +++ b/plugins/SpellChecker/src/hunspell/phonet.cxx @@ -27,7 +27,7 @@ Porting from Aspell to Hunspell using C-like structs */ -#include "..\commons.h"
+#include "..\commons.h" void init_phonet_hash(phonetable & parms) { @@ -81,7 +81,8 @@ int phonet (const char * inword, char * target, char word[MAXPHONETUTF8LEN + 1]; if (len == -1) len = strlen(inword); if (len > MAXPHONETUTF8LEN) return 0; - strcpy(word, inword); + strncpy(word, inword, MAXPHONETUTF8LEN); + word[MAXPHONETUTF8LEN] = '\0'; /** check word **/ i = j = z = 0; @@ -134,10 +135,10 @@ int phonet (const char * inword, char * target, || (*s == '^' && (i == 0 || ! myisalpha(word[i-1])) && (*(s+1) != '$' - || (! myisalpha(word[i+k0])))) + || (! myisalpha(word[i+k0]) ))) || (*s == '$' && i > 0 && myisalpha(word[i-1]) - && (! myisalpha(word[i+k0])))) + && (! myisalpha(word[i+k0]) ))) { /** search for followup rules, if: **/ /** parms.followup and k > 1 and NO '-' in searchstring **/ |