The sqlite3 module did cut off data from the SQLite database at the first null

character before sending it to a custom converter. This has been fixed now.
This commit is contained in:
Gerhard Häring 2006-07-02 17:48:30 +00:00
parent 6ffe499397
commit 762fbd3485
4 changed files with 28 additions and 5 deletions

View file

@ -321,12 +321,13 @@ PyObject* _fetch_one_row(Cursor* self)
}
if (converter != Py_None) {
val_str = (const char*)sqlite3_column_text(self->statement->st, i);
nbytes = sqlite3_column_bytes(self->statement->st, i);
val_str = (const char*)sqlite3_column_blob(self->statement->st, i);
if (!val_str) {
Py_INCREF(Py_None);
converted = Py_None;
} else {
item = PyString_FromString(val_str);
item = PyString_FromStringAndSize(val_str, nbytes);
if (!item) {
return NULL;
}