about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY5
-rw-r--r--editor/pnmpad.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index f7d49aa2..161c5a24 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,11 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+16.12.01 BJH  Release 10.73.05
+
+              pnmpad: fix bug: incorrect output width.  Introduced in
+              Netpbm 10.72 (July 2015).
+
 16.09.02 BJH  Release 10.73.05
 
               pnmquantall: Fix failure when temporary file location is
diff --git a/editor/pnmpad.c b/editor/pnmpad.c
index 168b73e0..051f3895 100644
--- a/editor/pnmpad.c
+++ b/editor/pnmpad.c
@@ -309,7 +309,7 @@ computePadSizeBeforeMult(unsigned int   const unpaddedSize,
             *begPadP = begPadReq;
             *endPadP = MAX(sizeReq, unpaddedSize + begPadReq) -
                 (begPadReq + unpaddedSize);
-        } else if (endPadReq) {
+        } else if (endPadSpec) {
             *endPadP = endPadReq;
             *begPadP = MAX(sizeReq, unpaddedSize + endPadReq) -
                 (unpaddedSize + endPadReq);