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

Overview
Comment:Fix a problem with the binary-to-decimal mode of the "varint" command-line test tool.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 34281c89cf09cc6fc0de22f840f1e7de09049f07
User & Date: drh 2013-04-29 17:48:30.175
Context
2013-05-07
19:36
Replace sqlite4_set_authorizer() with sqlite4_authorizer_push() and sqlite4_authorizer_pop(). check-in: 555f0c788d user: dan tags: trunk
2013-04-29
17:48
Fix a problem with the binary-to-decimal mode of the "varint" command-line test tool. check-in: 34281c89cf user: drh tags: trunk
17:15
Bug fix in the varint.c encoder for values between 140737488355328 and 281474976710655. check-in: 21442d15d0 user: drh tags: trunk
Changes
Unified Diff 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);