diff options
Diffstat (limited to 'editor/pnmpad.c')
-rw-r--r-- | editor/pnmpad.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/pnmpad.c b/editor/pnmpad.c index 051f3895..9c7a77e5 100644 --- a/editor/pnmpad.c +++ b/editor/pnmpad.c @@ -2,6 +2,7 @@ ** AJCD 4/9/90 */ +#include <assert.h> #include <string.h> #include <stdio.h> @@ -315,8 +316,10 @@ computePadSizeBeforeMult(unsigned int const unpaddedSize, (unpaddedSize + endPadReq); } else { if (sizeReq > unpaddedSize) { + assert(align <= 1.0 && align >= 0.0); *begPadP = ROUNDU((sizeReq - unpaddedSize) * align); *endPadP = sizeReq - unpaddedSize - *begPadP; + assert(*begPadP + unpaddedSize + *endPadP == sizeReq); } else { *begPadP = 0; *endPadP = 0; |