[babl/wip/pippin/inverted-cmyk] fish-reference: add workaround for bizarre behavior that differs inside/outside valgrind



commit 061e635276cee936f21c010bda89301a36f0b445
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Nov 16 01:49:46 2018 +0100

    fish-reference: add workaround for bizarre behavior that differs inside/outside valgrind

 babl/babl-fish-reference.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/babl/babl-fish-reference.c b/babl/babl-fish-reference.c
index aaba920..93769d4 100644
--- a/babl/babl-fish-reference.c
+++ b/babl/babl-fish-reference.c
@@ -719,9 +719,12 @@ babl_fish_reference_process_double (const Babl *babl,
   const void *type_double  = babl_type_from_id (BABL_DOUBLE);
 
   /* This is not the full/only condition XXX */
-  if (babl->fish.source->format.space->space.cmyk.is_cmyk)
+
+  /* XXX : sometimes is_cmyk is neither 0 or 1 */
+
+  if (babl->fish.source->format.space->space.cmyk.is_cmyk==1)
     source_kind = KIND_CMYK;
-  if (babl->fish.destination->format.space->space.cmyk.is_cmyk)
+  if (babl->fish.destination->format.space->space.cmyk.is_cmyk==1)
     destination_kind = KIND_CMYK;
 
   if (babl->fish.source->format.type[0] == type_double &&
@@ -971,6 +974,7 @@ babl_fish_reference_process_double (const Babl *babl,
      */
  }
 
+
   switch (destination_kind) /* XXX: the cases can share logic */
   {
     case KIND_CMYK:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]