diff options
Diffstat (limited to 'editor/pamditherbw.c')
-rw-r--r-- | editor/pamditherbw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/pamditherbw.c b/editor/pamditherbw.c index 49e78a4e..f26468bb 100644 --- a/editor/pamditherbw.c +++ b/editor/pamditherbw.c @@ -153,6 +153,7 @@ parseCommandLine(int argc, char ** argv, } + static struct pam makeOutputPam(unsigned int const width, unsigned int const height) { @@ -339,7 +340,7 @@ doHilbert(FILE * const ifP, int *x,*y; int sum; - grays = pnm_readpam(ifP, &graypam, sizeof(graypam)); + grays = pnm_readpam(ifP, &graypam, PAM_STRUCT_SIZE(tuple_type)); bitpam = makeOutputPam(graypam.width, graypam.height); @@ -852,7 +853,7 @@ main(int argc, char *argv[]) { tuple * bitrow; int row; - pnm_readpaminit(ifP, &graypam, sizeof(graypam)); + pnm_readpaminit(ifP, &graypam, PAM_STRUCT_SIZE(tuple_type)); bitpam = makeOutputPam(graypam.width, graypam.height); |