SQLite

Check-in [773c5c1d9c]
Login

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

Overview
Comment:Fix a bug in the geopoly_ccw() function. Test cases in TH3.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 773c5c1d9c0ec40c51949c38c9dc17e778086f3f92791cca9b85288de0076dab
User & Date: drh 2018-11-24 20:44:46.869
Context
2018-11-26
15:00
Minor comment enhancement in alter.c. No changes to code. (check-in: 12920bcb99 user: drh tags: trunk)
07:21
Merge latest trunk changes into this branch. (check-in: 28a615a2e0 user: dan tags: begin-concurrent)
2018-11-24
20:44
Fix a bug in the geopoly_ccw() function. Test cases in TH3. (check-in: 773c5c1d9c user: drh tags: trunk)
17:46
Make the winTruncate() method of the windows VFS be a no-op if there are outstanding references to the memory-mapped pages. Otherwise, memory might be deleted out from under those references when the file is remapped during the truncate operation. (check-in: ffce4aac18 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/rtree/geopoly.c.
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
  int argc,
  sqlite3_value **argv
){
  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
  if( p ){
    if( geopolyArea(p)<0.0 ){
      int ii, jj;
      for(ii=2, jj=p->nVertex*2 - 4; ii<jj; ii+=2, jj-=2){
        GeoCoord t = p->a[ii];
        p->a[ii] = p->a[jj];
        p->a[jj] = t;
        t = p->a[ii+1];
        p->a[ii+1] = p->a[jj+1];
        p->a[jj+1] = t;
      }







|







523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
  int argc,
  sqlite3_value **argv
){
  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
  if( p ){
    if( geopolyArea(p)<0.0 ){
      int ii, jj;
      for(ii=2, jj=p->nVertex*2 - 2; ii<jj; ii+=2, jj-=2){
        GeoCoord t = p->a[ii];
        p->a[ii] = p->a[jj];
        p->a[jj] = t;
        t = p->a[ii+1];
        p->a[ii+1] = p->a[jj+1];
        p->a[jj+1] = t;
      }