diff --git a/c/execute.c b/c/execute.c index c22d1df3..0c31e072 100644 --- a/c/execute.c +++ b/c/execute.c @@ -24,14 +24,18 @@ int pathsize; // number of allocated elements // FIXME mem int path_push(stackval sv, jv val) { - return 0; int pos = sv.pathidx; assert(pos <= pathsize); assert(pos >= 0); if (pos == pathsize) { - pathsize = pathsize ? pathsize * 2 : 100; + int oldpathsize = pathsize; + pathsize = oldpathsize ? oldpathsize * 2 : 100; pathbuf = realloc(pathbuf, sizeof(pathbuf[0]) * pathsize); + for (int i=oldpathsize; i