From 2327d3b774927fdf48903c0bdc1ca7ec93c7c8d0 Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Tue, 14 Apr 2020 12:08:26 -0700 Subject: [PATCH] Fix format string error in rusqlite::trace::log --- src/trace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trace.rs b/src/trace.rs index c034355..39ef69f 100644 --- a/src/trace.rs +++ b/src/trace.rs @@ -61,7 +61,7 @@ pub unsafe fn config_log(callback: Option) -> Result<()> { pub fn log(err_code: c_int, msg: &str) { let msg = CString::new(msg).expect("SQLite log messages cannot contain embedded zeroes"); 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()); } }