[trunk] Fix issue with & vs &&
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 14 Mar 2014 14:46:40 +0000 (14:46 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 14 Mar 2014 14:46:40 +0000 (14:46 +0000)
Fixes issue 277

src/bin/jp2/convert.c

index 5dd09da72e6a5486479a295a2ce93af7d6720a84..3588700b75e89bebf76ab517e8c5ec8f7624f59a 100644 (file)
@@ -1716,7 +1716,7 @@ static void read_pnm_header(FILE *reader, struct pnm_header *ph)
         }
         if(ph->depth < 1 || ph->depth > 4) return;
 
-        if(ph->width && ph->height && ph->depth & ph->maxval && ttype)
+        if(ph->width && ph->height && ph->depth && ph->maxval && ttype)
             ph->ok = 1;
     }
     else