about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY2
-rw-r--r--other/pamx/image.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 1f182a1e..cde391b8 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,8 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.37.0
 
+              pamx: fix bug with X depth = 0.
+
               pamx: fix bug: incorrect display of one-plane input image.
 
               libnetpbm: add pnm_computetuplefreqtable3().  Has ability
diff --git a/other/pamx/image.c b/other/pamx/image.c
index d74795cb..0e719438 100644
--- a/other/pamx/image.c
+++ b/other/pamx/image.c
@@ -157,7 +157,7 @@ newRGBImage(unsigned int const width,
             unsigned int const height,
             unsigned int const depth) {
     
-    unsigned int const pixlen = pixlen > 0 ? (depth + 7) / 8 : 1;
+    unsigned int const pixlen = depth > 0 ? (depth + 7) / 8 : 1;
         /* Special case for "zero" depth image, which is sometimes
            interpreted as "one color"
         */