Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 7f601b7

Browse files
committed
In CheckSpelling, leave room for the terminating NULL
1 parent 0824cd3 commit 7f601b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Spellchecker : public Nan::ObjectWrap {
6868
return;
6969
}
7070

71-
std::vector<uint16_t> text(string->Length());
71+
std::vector<uint16_t> text(string->Length() + 1);
7272
string->Write(reinterpret_cast<uint16_t *>(text.data()));
7373

7474
Spellchecker* that = Nan::ObjectWrap::Unwrap<Spellchecker>(info.Holder());

0 commit comments

Comments
 (0)