From 359e13f22e0a4d716bffa07b4217d5491a05aa2f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 May 2017 12:14:45 +0300 Subject: [PATCH] Test --- iguana/exchanges/DEXstats.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/DEXstats.h b/iguana/exchanges/DEXstats.h index 09d57c291..c72a5e172 100644 --- a/iguana/exchanges/DEXstats.h +++ b/iguana/exchanges/DEXstats.h @@ -786,7 +786,7 @@ void gen_jpegfile(char *fname,int32_t quality,uint8_t *bitmap,int32_t width,int3 if ( (outfile= fopen(fname,"wb")) == NULL) { fprintf(stderr, "can't open %s\n", fname); - iguana_exit(0,0); + return; } jpeg_stdio_dest(&cinfo, outfile); cinfo.image_width = width; /* image width and height, in pixels */ @@ -874,8 +874,8 @@ char *stats_prices(char *symbol,char *dest,struct DEXstats_disp *prices,int32_t if ( i != 2048 ) i++; sum /= i; - uint32_t height = 400,*bitmap = calloc(sizeof(*bitmap),3 * height * numdates*24); - output_line(0,sum,output,i,0xff00ff,bitmap,numdates*24,height) + uint32_t height = 400; uint8_t *bitmap = calloc(sizeof(*bitmap),3 * height * numdates*24); + output_line(0,sum,output,i,0xff00ff,bitmap,numdates*24,height); sprintf(fname,"%s/bitmaps/%s_%s.jpg",STATS_DEST,symbol,dest), OS_portable_path(fname); gen_jpegfile(fname,1,bitmap,numdates*24,height); free(bitmap);