@@ -1364,11 +1364,13 @@ int master_decode( long *nx,long *ny, // <- store result in nx,ny
13641364 if (isuseless (m )) {
13651365 int j ,fitssomewhere = 0 ;
13661366 for (j = iso_start ; (j )< m ; j ++ ) { // look in previous rects
1367- long minx ,miny ,maxx ,maxy ;
1367+ long minx ,miny ,maxx ,maxy , xdiv8 ;
13681368 if (isuseless ((j ))) continue ;
13691369 getboundaries ((j ),minx ,miny ,maxx ,maxy );
1370- if ( miny <=* ny && * ny < maxy && isInRange (* nx ,minx ,maxx ) ) { fitssomewhere = 1 ; break ; }
1371- }
1370+ // 1.33 fix to not remove valid results just across the edge of a territory
1371+ xdiv8 = x_divider (miny ,maxy )/4 ; // should be /8 but there's some extra margin
1372+ if ( miny - 60 <=* ny && * ny < maxy + 60 && isInRange (* nx ,minx - xdiv8 ,maxx + xdiv8 ) ) { fitssomewhere = 1 ; break ; }
1373+ }
13721374 if (!fitssomewhere ) {
13731375 err = -1234 ;
13741376 }
@@ -1629,8 +1631,7 @@ void master_encode( char *resultbuffer, int the_ctry, long x, long y, int forcec
16291631
16301632
16311633#ifdef VERSION_1_32 // 1.32 true recursive processing
1632- if (!stop_with_one_result )
1633- master_encode ( resultbuffer , the_ctry , x ,y , forcecoder , 0 ,0 ,1 );
1634+ master_encode ( resultbuffer , the_ctry , x ,y , forcecoder , stop_with_one_result ,/*allow-world*/ 0 ,1 );
16341635 result_override = -1 ;
16351636 return ; /**/
16361637#else
0 commit comments