]> granicus.if.org Git - imagemagick/commitdiff
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26787
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 27 Dec 2014 20:04:16 +0000 (20:04 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 27 Dec 2014 20:04:16 +0000 (20:04 +0000)
coders/xpm.c

index 10d5337afbd92385011bb84bb346a17573d45947..8c3e9d6e732953bbc406d60c3b3b0551f0c79383 100644 (file)
@@ -157,7 +157,7 @@ static size_t CopyXPMColor(char *destination,const char *source,size_t length)
     *p;
 
   p=source;
-  while (--length && (*p != '\0'))
+  while (length-- && (*p != '\0'))
     *destination++=(*p++);
   *destination='\0';
   return((size_t) (p-source));