forked from github/server
gcc warning eliminated
This commit is contained in:
parent
8d02d5a5aa
commit
262580f1d5
|
@ -413,9 +413,10 @@ void nr_spell_syntax(struct stream *out, spellbook_entry * sbe, const struct loc
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char substr[32];
|
char substr[32];
|
||||||
assert(sizeof(substr) > (cstr - syntaxp));
|
size_t len = cstr - syntaxp;
|
||||||
memcpy(substr, syntaxp, cstr - syntaxp);
|
assert(sizeof(substr) > len);
|
||||||
substr[cstr - syntaxp] = 0;
|
memcpy(substr, syntaxp, len);
|
||||||
|
substr[len] = 0;
|
||||||
locp = LOC(lang, mkname("spellpar", substr));
|
locp = LOC(lang, mkname("spellpar", substr));
|
||||||
syntaxp = substr + 1;
|
syntaxp = substr + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue