(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 25 Jan 2015 14:42:21 +0000 (14:42 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 25 Jan 2015 14:42:21 +0000 (14:42 +0000)
coders/hdr.c

index cd07f22e7fc0ea5ad68684e9f2a94fabc524a02f..73bf70e081794d7878de9d8ba1886411817b5334 100644 (file)
@@ -319,10 +319,14 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
                     chromaticity[6],
                     white_point[2];
 
-                  if (sscanf(value,"%g %g %g %g %g %g %g %g",&chromaticity[0],
-                      &chromaticity[1],&chromaticity[2],&chromaticity[3],
-                      &chromaticity[4],&chromaticity[5],&white_point[0],
-                      &white_point[1]) == 8)
+                  int
+                    count;
+
+                  count=sscanf(value,"%g %g %g %g %g %g %g %g",&chromaticity[0],
+                    &chromaticity[1],&chromaticity[2],&chromaticity[3],
+                    &chromaticity[4],&chromaticity[5],&white_point[0],
+                    &white_point[1]);
+                  if (count == 8)
                     {
                       image->chromaticity.red_primary.x=chromaticity[0];
                       image->chromaticity.red_primary.y=chromaticity[1];