summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker/src/dictionary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SpellChecker/src/dictionary.cpp')
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index 7c074fd159..bbdb192c89 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -370,19 +370,17 @@ protected:
FILE *file = _tfopen(filename, _T("rb"));
if (file != NULL) {
char tmp[1024];
- char c;
- int pos = 0;
+ int c, pos = 0;
while ((c = fgetc(file)) != EOF) {
if (c == '\n' || c == '\r' || pos >= _countof(tmp) - 1) {
if (pos > 0) {
tmp[pos] = '\0';
hunspell->add(tmp);
+ pos = 0;
}
-
- pos = 0;
}
else {
- tmp[pos] = c;
+ tmp[pos] = (char)c;
pos++;
}
}