From e893ef14d77ff4a16151ee8c8807a156d4b657b8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 18 Sep 2010 17:09:45 +0200 Subject: cubeit: More bugs --- src/cubeit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cubeit.c') diff --git a/src/cubeit.c b/src/cubeit.c index a63b7e6e..e82bbb8e 100644 --- a/src/cubeit.c +++ b/src/cubeit.c @@ -343,7 +343,7 @@ static void write_slice(const char *filename, double *vals, int z, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - row_pointers = malloc(h*sizeof(png_bytep *)); + row_pointers = malloc(ph*sizeof(png_bytep *)); /* Write the image data */ max /= boost; @@ -468,7 +468,7 @@ int main(int argc, char *argv[]) char *infile = NULL; char *geomfile = NULL; FILE *fh; - char *rval = NULL; + int rval; int n_images; char *prefix = NULL; int nthreads = 1; @@ -637,12 +637,12 @@ int main(int argc, char *argv[]) do { int i; + rval = 0; for ( i=0; i