mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Fix format string error in rusqlite::trace::log
This commit is contained in:
parent
abbab7216a
commit
2327d3b774
@ -61,7 +61,7 @@ pub unsafe fn config_log(callback: Option<fn(c_int, &str)>) -> Result<()> {
|
|||||||
pub fn log(err_code: c_int, msg: &str) {
|
pub fn log(err_code: c_int, msg: &str) {
|
||||||
let msg = CString::new(msg).expect("SQLite log messages cannot contain embedded zeroes");
|
let msg = CString::new(msg).expect("SQLite log messages cannot contain embedded zeroes");
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::sqlite3_log(err_code, msg.as_ptr());
|
ffi::sqlite3_log(err_code, b"%s\0" as *const _ as *const c_char, msg.as_ptr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user