GetMagickToken() and locales that use ", " as radix character

[email protected] Thu, 08 Jan 2009 18:56:11 +0100
Newsgroups gmane.comp.video.image-magick.bugs
Message-ID <[email protected]>
For instance, an attempt to draw "rectangle 10,20 30,40" while the German
locale is active results in exception NonconformingDrawingPrimitiveDefinition
as "10,20" and "30,40" are parsed as two decimal numbers 10.2 and 30.4,
respectively, instead of four decimal numbers.

Here's a patch.

--- token.c	24 Sep 2007 12:24:54 -0000	1.1.1.2
+++ token.c	8 Jan 2009 17:44:24 -0000	1.2
@@ -222,9 +222,9 @@
            *q;

          (void) strtod(p,&q);
-        if (p != q)
+        if (p != q && *p != ',')
            {
-            for ( ; p < q; p++)
+            for ( ; p < q && *p != ','; p++)
                token[i++]=(*p);
              if (*p == '%')
                token[i++]=(*p++);