X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52e5fa6ad78f375cec5a207a123a4aa3939c8ddf..5cd4aeb1aa08aaab2cb00a9de841783310790caa:/lib/quad_tile/quad_tile.c?ds=sidebyside diff --git a/lib/quad_tile/quad_tile.c b/lib/quad_tile/quad_tile.c index cd45e6e76..304776982 100644 --- a/lib/quad_tile/quad_tile.c +++ b/lib/quad_tile/quad_tile.c @@ -14,10 +14,10 @@ static tilelist_t tilelist_for_area(unsigned int minx, unsigned int miny, unsign unsigned int maxtilec; maxtilec = 256; - + tl.tilev = malloc(maxtilec * sizeof(unsigned int)); tl.tilec = 0; - + for (x = minx; x <= maxx; x++) { for (y = miny; y <= maxy; y++) @@ -75,7 +75,7 @@ static VALUE tiles_for_area(VALUE self, VALUE bbox) for (t = 0; t < tl.tilec; t++) { - rb_ary_push(tiles, UINT2NUM(tl.tilev[tl.tilec])); + rb_ary_push(tiles, UINT2NUM(tl.tilev[t])); } free(tl.tilev);