diff --git a/MagickCore/display.c b/MagickCore/display.c
index 9fdebf1..21d5788 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -7828,7 +7828,7 @@
       */
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
-      (void) GammaImage(*image,atof(factor),exception);
+      (void) GammaImage(*image,strtod(factor,(char **) NULL),exception);
       XSetCursorState(display,windows,MagickFalse);
       if (IfMagickTrue(windows->image.orphan) )
         break;