/ 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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_regexp.c.

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