Commit 40a8b1af authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

fix stupid bug in AtC when using alloca() instead of VLAs

parent 33a41a4f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ namespace ATC {
  {
    string type = args[0];
    int narg = nargs -1;
    double *dargs = alloca(sizeof(double) * narg);
    double *dargs = (double *) alloca(sizeof(double) * narg);
    for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]);
  
    return function(type, narg, dargs);
@@ -193,7 +193,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL;
  {
    string type = args[0];
    int narg = nargs -1;
    double *dargs = alloca(sizeof(double) * narg);
    double *dargs = (double *) alloca(sizeof(double) * narg);
    for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]);
  
    return function(type, narg, dargs);