From b900668a5689127b993b552ebd4a051ce42405a9 Mon Sep 17 00:00:00 2001 From: knarf Date: Tue, 27 May 2014 16:43:01 +0000 Subject: make sure to allocate the right amount of memory (use the right variable type here) git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@157 eff87b29-5268-4891-90a3-a07138403961 --- src/Write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Write.c b/src/Write.c index ccd824a..7152919 100644 --- a/src/Write.c +++ b/src/Write.c @@ -202,7 +202,7 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) } assert (CCTK_VarTypeSize (gdata.vartype) <= imax); } - total_hsize = hsize[0] * hsize[1] * CCTK_VarTypeSize (gdata.vartype); + total_hsize = hsize[0] * hsize[1] * CCTK_VarTypeSize (htype); assert (total_hsize >= 0); if (total_hsize <= 0) { -- cgit v1.2.3