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
This commit is contained in:
+2
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user