From f0442a0a3a79f05014d0ef36c2fa91896b9381bf Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 25 Oct 2000 17:18:03 +0000 Subject: Avoid division by zero if minimum == maximum of slice to output. git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@25 eff87b29-5268-4891-90a3-a07138403961 --- src/JPEG.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/JPEG.c b/src/JPEG.c index 588facc..990d9d1 100644 --- a/src/JPEG.c +++ b/src/JPEG.c @@ -229,7 +229,17 @@ void AutoColorDataSlice(int nx,int ny, /* size of the image x & y */ int i,last; CCTK_REAL F=(CCTK_REAL)rdfac; /* cast to CCTK_REAL... don't know how the original worked at all without a cast */ for(i=0,last=nx*ny;i0){ -- cgit v1.2.3