SQLite4
Check-in [34281c89cf09cc6fc0de22f840f1e7de09049f07]
Not logged in

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

Overview
SHA1 Hash:34281c89cf09cc6fc0de22f840f1e7de09049f07
Date: 2013-04-29 17:48:30
User: drh
Comment:Fix a problem with the binary-to-decimal mode of the ""varint"" command-line test tool.
Tags And Properties
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/varint.c

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
           argv[0]);
    return 1;
  }
  for(i=1; i<argc; i++){
    const char *z = argv[i];
    x = 0;
    if( z[0]=='=' ){
      for(j=1; j<sizeof(out)/2 && z[j] && z[j+1]; j+=2 ){
        out[j-1] = hexToInt(z[j])*16 + hexToInt(z[j+1]);
      }
      sqlite4GetVarint64(out, j-1, &x);
    }else{
      while( z[0]>='0' && z[0]<='9' ){
        x = x*10 + z[0] - '0';
        z++;
      }
    }
    n = sqlite4PutVarint64(out, x);







|
|

|







304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
           argv[0]);
    return 1;
  }
  for(i=1; i<argc; i++){
    const char *z = argv[i];
    x = 0;
    if( z[0]=='=' ){
      for(j=1; j/2<sizeof(out) && z[j] && z[j+1]; j+=2 ){
        out[j/2] = hexToInt(z[j])*16 + hexToInt(z[j+1]);
      }
      sqlite4GetVarint64(out, j/2, &x);
    }else{
      while( z[0]>='0' && z[0]<='9' ){
        x = x*10 + z[0] - '0';
        z++;
      }
    }
    n = sqlite4PutVarint64(out, x);