aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spell.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-30 23:19:02 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-06-16 01:36:31 -0300
commit81ca5ff126c5c0731b7eb57513f899ac6619073e (patch)
tree63784713d4e3abb32a7bf5a491a8e155171cbbce /src/nvim/spell.c
parent8234f2839f78009442b4ed7bc0599e6b581d5cf8 (diff)
downloadrneovim-81ca5ff126c5c0731b7eb57513f899ac6619073e.tar.gz
rneovim-81ca5ff126c5c0731b7eb57513f899ac6619073e.tar.bz2
rneovim-81ca5ff126c5c0731b7eb57513f899ac6619073e.zip
No OOM in enc_canonize()
Fix a `return FAIL` that should be `return NULL` in `enc_locale()`
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r--src/nvim/spell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index 8214d95c00..ca522191b9 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -4438,7 +4438,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
if (is_aff_rule(items, itemcnt, "SET", 2) && aff->af_enc == NULL) {
// Setup for conversion from "ENC" to 'encoding'.
aff->af_enc = enc_canonize(items[1]);
- if (aff->af_enc != NULL && !spin->si_ascii
+ if (!spin->si_ascii
&& convert_setup(&spin->si_conv, aff->af_enc,
p_enc) == FAIL)
smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),
@@ -5978,7 +5978,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
// Setup for conversion to 'encoding'.
line += 9;
enc = enc_canonize(line);
- if (enc != NULL && !spin->si_ascii
+ if (!spin->si_ascii
&& convert_setup(&spin->si_conv, enc,
p_enc) == FAIL)
smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),