/ Check-in [691cc201]
Login

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

Overview
Comment:Disregard leading zeros when converting strings to 32-bit integers.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 691cc201e135a01c4cc4057be7e5d99285ab392d
User & Date: drh 2015-04-18 04:45:00
Context
2015-04-18
16:25
Ensure that if a "ROLLBACK TO" statement is used to rollback (but not close) theoutermost transaction, the xRollbackTo() method of any virtual tables involved in the transaction is invoked. check-in: e98d481d user: dan tags: trunk
04:45
Disregard leading zeros when converting strings to 32-bit integers. check-in: 691cc201 user: drh tags: trunk
00:22
Fix an incorrect assert() in the sqlite3_trace() logic. check-in: eabde339 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/util.c.

651
652
653
654
655
656
657

658
659
660
661
662
663
664
      memcpy(pValue, &u, 4);
      return 1;
    }else{
      return 0;
    }
  }
#endif

  for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){
    v = v*10 + c;
  }

  /* The longest decimal representation of a 32 bit integer is 10 digits:
  **
  **             1234567890







>







651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
      memcpy(pValue, &u, 4);
      return 1;
    }else{
      return 0;
    }
  }
#endif
  while( zNum[0]=='0' ) zNum++;
  for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){
    v = v*10 + c;
  }

  /* The longest decimal representation of a 32 bit integer is 10 digits:
  **
  **             1234567890