summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-04-05 23:09:46 +0200
committertomsmeding <tom.smeding@gmail.com>2017-04-05 23:09:46 +0200
commit46d3cf490464eab10134c9b14e180a77b0976fed (patch)
treea9acc34418d9019a73066f8caa97e1b39f5e69c2
parentf84e1814e1fe0e216eecd7bfe98a422e4144ee56 (diff)
Don't segfault on machines with small stacks
-rw-r--r--attract.c2
1 files changed, 1 insertions, 1 deletions
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;