diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index c62ce45..beb38f3 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -5207,7 +5207,7 @@ void GfxImageColorMap::getCMYK(Guchar *x, GfxCMYK *cmyk) {
 
   if (colorSpace2) {
     for (i = 0; i < nComps2; ++i) {
-      color.c[i] = lookup[i][x[0]];
+      color.c[i] = lookup2[i][x[0]];
     }
     colorSpace2->getCMYK(&color, cmyk);
   } else {
