diff options
author | drh <drh@noemail.net> | 2009-02-03 16:25:47 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2009-02-03 16:25:47 +0000 |
commit | 7ed0cae237a633e9e58e349fb8481eee7ef366f0 (patch) | |
tree | 933c53fe2d15390ddf91dbd73d9244332bbd0ab8 /src | |
parent | 1d34fdecb6dbfb042d191a06925e50faefc7e049 (diff) | |
download | sqlite-7ed0cae237a633e9e58e349fb8481eee7ef366f0.tar.gz sqlite-7ed0cae237a633e9e58e349fb8481eee7ef366f0.zip |
Fix the sqlite3_mprintf_long test command (added by check-in (6224) in order
to address ticket #3621) so that it works on systems with sizeof(int)==4 and
sizeof(long)==8. (CVS 6240)
FossilOrigin-Name: 2e45c2a85183f7430225aa8dd89ee05028afecf2
Diffstat (limited to 'src')
-rw-r--r-- | src/test1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test1.c b/src/test1.c index 3a4ba7027..eff89a7de 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.345 2009/02/01 00:21:10 drh Exp $ +** $Id: test1.c,v 1.346 2009/02/03 16:25:48 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -1284,6 +1284,7 @@ static int sqlite3_mprintf_long( for(i=2; i<5; i++){ if( Tcl_GetInt(interp, argv[i], &b[i-2]) ) return TCL_ERROR; a[i-2] = (long int)b[i-2]; + a[i-2] &= (((u64)1)<<(sizeof(int)*8))-1; } z = sqlite3_mprintf(argv[1], a[0], a[1], a[2]); Tcl_AppendResult(interp, z, 0); |