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
+1 -1
View File
@@ -73,7 +73,7 @@ WhereCost whereCostFromInteger(int x){
}
static unsigned long int whereCostToInt(WhereCost x){
unsigned long int n;
if( x<=10 ) return 1;
if( x<10 ) return 1;
n = x%10;
x /= 10;
if( n>=5 ) n -= 2;