[devel] Revised png_get_int_16() to be similar to png_get_int_32().

This commit is contained in:
Glenn Randers-Pehrson
2010-07-31 07:09:58 -05:00
parent 4009a76e97
commit 48dc6ebf5c
9 changed files with 37 additions and 24 deletions

View File

@@ -88,8 +88,9 @@ png_get_int_32)(png_bytep buf)
png_uint_16 (PNGAPI
png_get_uint_16)(png_bytep buf)
{
png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +
(png_uint_16)(*(buf + 1)));
png_uint_16 i =
((png_uint_32)(*buf) << 8) +
((png_uint_32)(*(buf + 1)));
return (i);
}