Do not assume sqlite3_column_text is valid UTF-8.

Fix Statement::value_ref
This commit is contained in:
gwenn
2019-07-24 20:08:31 +02:00
parent bd5506899d
commit f0ae7b6e9b
5 changed files with 16 additions and 12 deletions

View File

@@ -86,6 +86,7 @@ impl Sql {
self.push_real(r);
}
ValueRef::Text(s) => {
let s = std::str::from_utf8(s).expect("invalid UTF-8");
self.push_string_literal(s);
}
_ => {