about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY3
-rw-r--r--editor/pamrubber.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 5dc629c4..4bd46686 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -19,6 +19,9 @@ not yet  BJH  Release 10.89.00
               -spreadluminosity or both -randomseed and -norandom, rather
               than just pick one.
 
+              pamrubber: Fix bug: -frame doesn't work.  Always broken.
+              (Pamrubber was new in Netpbm 10.54 (March 2011).
+
 19.09.28 BJH  Release 10.88.00
 
               pnmquant: Fail if user specifies more than one of -meanpixel,
diff --git a/editor/pamrubber.c b/editor/pamrubber.c
index 9ded9754..602701ec 100644
--- a/editor/pamrubber.c
+++ b/editor/pamrubber.c
@@ -675,7 +675,7 @@ clippedPoint(const struct pam * const pamP,
              point              const p) {
 
     int const roundedX = ROUND(p.x);
-    int const roundedY = ROUND(p.x);
+    int const roundedY = ROUND(p.y);
 
     int clippedX, clippedY;
 
@@ -691,8 +691,8 @@ clippedPoint(const struct pam * const pamP,
 
     if (roundedY <= 0)
         clippedY = 1;
-    else if (roundedY > pamP->width - 1)
-        clippedY = pamP->width - 2;
+    else if (roundedY > pamP->height - 1)
+        clippedY = pamP->height - 2;
     else
         clippedY = roundedY;