Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqlite): do not cast pointers to i32 #1160

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sqlx-core/src/sqlite/statement/virtual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ fn prepare(
// statement in zSql. these routines only compile the first statement,
// so tail is left pointing to what remains un-compiled.

let n = (tail as i32) - (query_ptr as i32);
query.advance(n as usize);
let n = (tail as usize) - (query_ptr as usize);
query.advance(n);

if let Some(handle) = NonNull::new(statement_handle) {
return Ok(Some(StatementHandle(handle)));
Expand Down