mirror of
https://github.com/isar/rusqlite.git
synced 2025-01-20 06:00:51 +08:00
Fix order of parameters in InvalidParameterCount message
This prints a message like `Error: Wrong number of parameters passed to query. Got 7, needed 8`, but the numbers were the wrong way around - i.e. it should have printed `Got 8, needed 7` in this case.
This commit is contained in:
parent
f79a9ca3ef
commit
83c038107d
@ -454,7 +454,7 @@ impl Statement<'_> {
|
|||||||
self.bind_parameter(&p, index)?;
|
self.bind_parameter(&p, index)?;
|
||||||
}
|
}
|
||||||
if index != expected {
|
if index != expected {
|
||||||
Err(Error::InvalidParameterCount(expected, index))
|
Err(Error::InvalidParameterCount(index, expected))
|
||||||
} else {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user