mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
The new function code passes regression tests. (CVS 403)
FossilOrigin-Name: b00cf110b1cc671b7200a5ce8b9e704f660763c9
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
** But other routines are also provided to help in building up
|
||||
** a program instruction by instruction.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.127 2002/02/28 01:46:13 drh Exp $
|
||||
** $Id: vdbe.c,v 1.128 2002/02/28 03:04:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -552,6 +552,7 @@ char *sqlite_set_result_string(sqlite_func *p, const char *zResult, int n){
|
||||
p->s.flags = STK_Null;
|
||||
n = 0;
|
||||
p->z = 0;
|
||||
p->s.n = 0;
|
||||
}else{
|
||||
if( n<0 ) n = strlen(zResult);
|
||||
if( n<NBFS-1 ){
|
||||
@@ -567,8 +568,8 @@ char *sqlite_set_result_string(sqlite_func *p, const char *zResult, int n){
|
||||
}
|
||||
p->s.flags = STK_Str | STK_Dyn;
|
||||
}
|
||||
p->s.n = n+1;
|
||||
}
|
||||
p->s.n = n;
|
||||
return p->z;
|
||||
}
|
||||
void sqlite_set_result_int(sqlite_func *p, int iResult){
|
||||
@@ -1878,7 +1879,7 @@ case OP_Function: {
|
||||
sqlite_func ctx;
|
||||
|
||||
n = pOp->p1;
|
||||
VERIFY( if( n<=0 ) goto bad_instruction; )
|
||||
VERIFY( if( n<0 ) goto bad_instruction; )
|
||||
VERIFY( if( p->tos+1<n ) goto not_enough_stack; )
|
||||
for(i=p->tos-n+1; i<=p->tos; i++){
|
||||
if( (aStack[i].flags & STK_Null)==0 ){
|
||||
|
Reference in New Issue
Block a user