/ Check-in [8285b15a]
Login

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

Overview
Comment:Fix an out-of-order local variable declaration in test_regexp.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8285b15a058811a9a8b452837f52e6a065868115
User & Date: drh 2013-01-04 19:22:33
Context
2013-01-04
20:45
Do not use umask() since it change the umask for the entire process, not just the thread using SQLite. Make whatever permission changes are needed using fchmod() after the file is created, instead. check-in: 6c4c2b7d user: drh tags: trunk
19:22
Fix an out-of-order local variable declaration in test_regexp.c. check-in: 8285b15a user: drh tags: trunk
14:06
Fix the zInit[] optimization of test_regexp.c when the initial string contains 3-byte UTF8 characters. check-in: 357231ec user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_regexp.c.

381
382
383
384
385
386
387
388
389

390
391
392
393
394
395
396
  static const char zEsc[] = "afnrtv\\()*.+?[$^{|}]";
  static const char zTrans[] = "\a\f\n\r\t\v";
  int i, v = 0;
  char c;
  if( p->sIn.i>=p->sIn.mx ) return 0;
  c = p->sIn.z[p->sIn.i];
  if( c=='u' && p->sIn.i+5<p->sIn.mx ){
    v = 0;
    const unsigned char *zIn = p->sIn.z + p->sIn.i;

    if( re_hex(zIn[1],&v)
     && re_hex(zIn[2],&v)
     && re_hex(zIn[3],&v)
     && re_hex(zIn[4],&v)
    ){
      p->sIn.i += 5;
      return v;







<

>







381
382
383
384
385
386
387

388
389
390
391
392
393
394
395
396
  static const char zEsc[] = "afnrtv\\()*.+?[$^{|}]";
  static const char zTrans[] = "\a\f\n\r\t\v";
  int i, v = 0;
  char c;
  if( p->sIn.i>=p->sIn.mx ) return 0;
  c = p->sIn.z[p->sIn.i];
  if( c=='u' && p->sIn.i+5<p->sIn.mx ){

    const unsigned char *zIn = p->sIn.z + p->sIn.i;
    v = 0;
    if( re_hex(zIn[1],&v)
     && re_hex(zIn[2],&v)
     && re_hex(zIn[3],&v)
     && re_hex(zIn[4],&v)
    ){
      p->sIn.i += 5;
      return v;