Skip to content

Commit

Permalink
Fixed bug 2758 - Android issues with NDK r10c and API-21
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 17, 2015
1 parent 6e53615 commit 58396c8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions external/libpng-1.6.2/pngget.c
Expand Up @@ -858,8 +858,9 @@ png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
* if neither floating point APIs nor internal floating point arithmetic
* are enabled.
*/
*width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width");
*height = png_fixed(png_ptr, atof(info_ptr->scal_s_height),
/* https://bugzilla.libsdl.org/show_bug.cgi?id=2758 : atof->strtod */
*width = png_fixed(png_ptr, strtod(info_ptr->scal_s_width, NULL), "sCAL width");
*height = png_fixed(png_ptr, strtod(info_ptr->scal_s_height, NULL),
"sCAL height");
return (PNG_INFO_sCAL);
}
Expand All @@ -877,8 +878,9 @@ png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr,
(info_ptr->valid & PNG_INFO_sCAL))
{
*unit = info_ptr->scal_unit;
*width = atof(info_ptr->scal_s_width);
*height = atof(info_ptr->scal_s_height);
/* https://bugzilla.libsdl.org/show_bug.cgi?id=2758 : atof->strtod */
*width = strtod(info_ptr->scal_s_width, NULL);
*height = strtod(info_ptr->scal_s_height, NULL);
return (PNG_INFO_sCAL);
}

Expand Down

0 comments on commit 58396c8

Please sign in to comment.