diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-04-05 23:09:46 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-04-05 23:09:46 +0200 |
commit | 46d3cf490464eab10134c9b14e180a77b0976fed (patch) | |
tree | a9acc34418d9019a73066f8caa97e1b39f5e69c2 | |
parent | f84e1814e1fe0e216eecd7bfe98a422e4144ee56 (diff) |
Don't segfault on machines with small stacks
-rw-r--r-- | attract.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |