/ Check-in [235157de]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a missing "int" on a constant declaration.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 235157de5113ac4c750e36a498e2a1f1cf461751
User & Date: drh 2015-03-21 20:50:58
Context
2015-03-21
20:59
Do not invoke a C preprocessor macro with an empty argument, as (reportedly) some versions of GCC are unable to deal with that. check-in: de9da317 user: drh tags: trunk
20:50
Add a missing "int" on a constant declaration. check-in: 235157de user: drh tags: trunk
19:35
Avoid a segfault if NULL is passed as the first argument to SQL scalar function fts3_tokenizer(). check-in: 6d098969 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3.c.

906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
**
** If *pp does not being with a decimal digit SQLITE_ERROR is returned and
** the output value undefined. Otherwise SQLITE_OK is returned.
**
** This function is used when parsing the "prefix=" FTS4 parameter.
*/
static int fts3GobbleInt(const char **pp, int *pnOut){
  const MAX_NPREFIX = 10000000;
  const char *p;                  /* Iterator pointer */
  int nInt = 0;                   /* Output value */

  for(p=*pp; p[0]>='0' && p[0]<='9'; p++){
    nInt = nInt * 10 + (p[0] - '0');
    if( nInt>MAX_NPREFIX ){
      nInt = 0;







|







906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
**
** If *pp does not being with a decimal digit SQLITE_ERROR is returned and
** the output value undefined. Otherwise SQLITE_OK is returned.
**
** This function is used when parsing the "prefix=" FTS4 parameter.
*/
static int fts3GobbleInt(const char **pp, int *pnOut){
  const int MAX_NPREFIX = 10000000;
  const char *p;                  /* Iterator pointer */
  int nInt = 0;                   /* Output value */

  for(p=*pp; p[0]>='0' && p[0]<='9'; p++){
    nInt = nInt * 10 + (p[0] - '0');
    if( nInt>MAX_NPREFIX ){
      nInt = 0;