Fix out-of-bounds read

SVN revision: 82455
This commit is contained in:
Jaehwan Kim 2013-01-09 11:47:11 +00:00
parent 7adcc92f18
commit 6f2142abe9
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ _scale_cb(const Evas_Object *obj __UNUSED__,
double lat,
int zoom)
{
if (zoom < 0 || zoom >= (int)sizeof(_osm_scale_meter)) return 0;
if (zoom < 0 || zoom >= (int)(sizeof(_osm_scale_meter)/sizeof(_osm_scale_meter[0]))) return 0;
return _osm_scale_meter[zoom] / cos(lat * ELM_PI / 180.0);
}