null+****@clear*****
null+****@clear*****
2010年 8月 22日 (日) 13:52:13 JST
Kouhei Sutou 2010-08-22 04:52:13 +0000 (Sun, 22 Aug 2010) New Revision: 6b3bef02f6f2c29809cc3784e30728542ad4539c Log: fix geo_in_rectangle() end condition Modified files: lib/geo.c Modified: lib/geo.c (+3 -3) =================================================================== --- lib/geo.c 2010-08-22 03:56:28 +0000 (45b75ec) +++ lib/geo.c 2010-08-22 04:52:13 +0000 (c9be665) @@ -708,12 +708,12 @@ grn_geo_search_in_rectangle(grn_ctx *ctx, grn_obj *obj, grn_obj **args, int narg &geo_point_min, &geo_point_max); if (direction == MESH_LATITUDE) { distance = geo_point_max.latitude - geo_point_min.latitude + 1; - start = geo_point2->latitude; - end = geo_point_max.latitude + distance; + start = geo_point_min.latitude; + end = geo_point1->latitude; } else { distance = geo_point_max.longitude - geo_point_min.longitude + 1; start = geo_point_min.longitude; - end = geo_point2->longitude + distance; + end = geo_point2->longitude; } #ifdef GEO_DEBUG printf("direction: %s\n",