From 46d3cf490464eab10134c9b14e180a77b0976fed Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 5 Apr 2017 23:09:46 +0200 Subject: Don't segfault on machines with small stacks --- attract.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attract.c b/attract.c index 9e093ec..9209a16 100644 --- a/attract.c +++ b/attract.c @@ -163,7 +163,7 @@ int main(int argc,char **argv){ printf("midy = %lf\n",cfg.midy); printf("exponent = %lf\n",cfg.exponent); - unsigned char img[cfg.width*cfg.height*3]; + unsigned char *img=malloc(cfg.width*cfg.height*3); int nthreads=sysconf(_SC_NPROCESSORS_ONLN); if(nthreads==4)nthreads/=2; -- cgit v1.2.3-70-g09d2