From aa014dd308b678c3f5d89beca65d280e6764be90 Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Fri, 31 Jan 2003 08:59:15 +0100
Subject: [PATCH] bugfix - doesn't the colors always have to be sorted? Bug
 appears after the main testsuite is run on large INT_TYPE linux systems

Rev: lib/modules/_Image_XPM.pmod:1.14
---
 lib/modules/_Image_XPM.pmod | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/modules/_Image_XPM.pmod b/lib/modules/_Image_XPM.pmod
index b62f881ad8..b0d6e1dc5f 100644
--- a/lib/modules/_Image_XPM.pmod
+++ b/lib/modules/_Image_XPM.pmod
@@ -68,9 +68,14 @@ mapping _decode( string what, void|mapping opts )
   if(sizeof(data) < ncolors+2)
     error("Too few elements in array to decode color values\n");
   array colors;
-  if(cpp < 4)
-    colors = data[1..ncolors];
-  else
+
+// kludge? probable FIXME?
+// I can't see why the colors not always must be sorted...
+//  /Mirar 2003-01-31
+
+//   if(cpp < 4)
+//     colors = data[1..ncolors];
+//   else
     colors = sort(data[1..ncolors]);
   TD("Creating images");
   object i = Image.image( width, height );
-- 
GitLab