1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Fix an off-by-one error in the WhereCost to integer conversion.

FossilOrigin-Name: b5ca80d924f8c6d31f036247ba6e20d234f4482e
This commit is contained in:
drh
2013-06-13 14:51:53 +00:00
parent 3b48e8c91a
commit 12ffbc7e69
4 changed files with 10 additions and 10 deletions

View File

@@ -449,7 +449,7 @@ struct WhereInfo {
*/
static u64 whereCostToInt(WhereCost x){
u64 n;
if( x<=10 ) return 1;
if( x<10 ) return 1;
n = x%10;
x /= 10;
if( n>=5 ) n -= 2;