diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libppm1.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/libppm1.c b/lib/libppm1.c index f1eb8b7d..0658529a 100644 --- a/lib/libppm1.c +++ b/lib/libppm1.c @@ -252,22 +252,26 @@ validateRppmRow(pixel * const pixelrow, pixval const b = PPM_GETB(pixelrow[col]); if (r > maxval) - pm_error("Red sample value %u is greater than maxval (%u)", - r, maxval); + pm_asprintf( + errorP, + "Red sample value %u is greater than maxval (%u)", + r, maxval); if (g > maxval) - pm_error("Green sample value %u is greater than maxval (%u)", - g, maxval); + pm_asprintf( + errorP, + "Green sample value %u is greater than maxval (%u)", + g, maxval); if (b > maxval) - pm_error("Blue sample value %u is greater than maxval (%u)", - b, maxval); + pm_asprintf( + errorP, + "Blue sample value %u is greater than maxval (%u)", + b, maxval); } } } - - static void readRppmRow(FILE * const fileP, pixel * const pixelrow, |