mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-11-22 06:23:02 -05:00
Fix bug reported by sanitizer
This commit is contained in:
parent
49e025b565
commit
ad4aeaa1a0
@ -77,7 +77,7 @@ suggest(Dictionary *self, PyObject *args) {
|
||||
|
||||
const std::vector<std::string>& word_list = self->handle->suggest(word);
|
||||
ans = PyTuple_New(word_list.size());
|
||||
if (ans == NULL) PyErr_NoMemory();
|
||||
if (ans == NULL) return PyErr_NoMemory();
|
||||
Py_ssize_t i = 0;
|
||||
for(auto const& s: word_list) {
|
||||
temp = PyUnicode_Decode(s.c_str(), s.size(), self->encoding, "strict");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user