aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/jpeg-6b/rdppm.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/jpeg-6b/rdppm.c')
-rw-r--r--test/monniaux/jpeg-6b/rdppm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/monniaux/jpeg-6b/rdppm.c b/test/monniaux/jpeg-6b/rdppm.c
index 2543ff5e..1df35c1b 100644
--- a/test/monniaux/jpeg-6b/rdppm.c
+++ b/test/monniaux/jpeg-6b/rdppm.c
@@ -418,7 +418,7 @@ start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
half_maxval = maxval / 2;
for (val = 0; val <= (INT32) maxval; val++) {
/* The multiplication here must be done in 32 bits to avoid overflow */
- source->rescale[val] = (JSAMPLE) DIVISION((val*MAXJSAMPLE + half_maxval), maxval);
+ source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval);
}
}
}