diff options
author | drh <drh@noemail.net> | 2003-06-07 11:29:50 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2003-06-07 11:29:50 +0000 |
commit | 94ce4c1e3b697803c5b9f176981d3fbe9fb8beb6 (patch) | |
tree | 01c5efb58b746117f9e38e1ab34d8eca6aee7013 /src | |
parent | 048aa234ef4921b8a88f947ee10a3ba7ec3bbdcc (diff) | |
download | sqlite-94ce4c1e3b697803c5b9f176981d3fbe9fb8beb6.tar.gz sqlite-94ce4c1e3b697803c5b9f176981d3fbe9fb8beb6.zip |
Do not assume that a pointer can fit in a long inside the printf() code.
Ticket #342. (CVS 1013)
FossilOrigin-Name: 5dad7c05e9789e101d5ce75a6f3ea2ffb278b29d
Diffstat (limited to 'src')
-rw-r--r-- | src/printf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/printf.c b/src/printf.c index 8587f80d2..67144b26d 100644 --- a/src/printf.c +++ b/src/printf.c @@ -389,7 +389,7 @@ static int vxprintf( longvalue = longvalue/base; }while( longvalue>0 ); } - length = (long)&buf[etBUFSIZE]-(long)bufpt; + length = &buf[etBUFSIZE]-bufpt; for(idx=precision-length; idx>0; idx--){ *(--bufpt) = '0'; /* Zero pad */ } @@ -401,7 +401,7 @@ static int vxprintf( for(pre=infop->prefix; (x=(*pre))!=0; pre++) *(--bufpt) = x; } } - length = (long)&buf[etBUFSIZE]-(long)bufpt; + length = &buf[etBUFSIZE]-bufpt; break; case etFLOAT: case etEXP: @@ -511,7 +511,7 @@ static int vxprintf( /* The converted number is in buf[] and zero terminated. Output it. ** Note that the number is in the usual order, not reversed as with ** integer conversions. */ - length = (long)bufpt-(long)buf; + length = bufpt-buf; bufpt = buf; /* Special case: Add leading zeros if the flag_zeropad flag is |