1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix another twos-complement negation error. Ticket #313. (CVS 973)

FossilOrigin-Name: f267a8a4ff52eb7ee3ac20a8e3a8ab5fe19e445d
This commit is contained in:
drh
2003-05-13 01:52:31 +00:00
parent 3b2129cf77
commit 39581966a0
3 changed files with 9 additions and 10 deletions

View File

@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.24 2003/03/27 12:51:25 drh Exp $
** $Id: func.c,v 1.25 2003/05/13 01:52:32 drh Exp $
*/
#include <ctype.h>
#include <math.h>
@ -324,8 +324,7 @@ static void randStr(sqlite_func *context, int argc, const char **argv){
}
n = iMin;
if( iMax>iMin ){
r = sqliteRandomInteger();
if( r<0 ) r = -r;
r = sqliteRandomInteger() & 0x7fffffff;
n += r%(iMax + 1 - iMin);
}
r = 0;