]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/dc.c
dc: fix off by one in stack overflow check (thanks BurnZeZ)
[plan9front.git] / sys / src / cmd / dc.c
index c121b13d8af0da61ebde17644a3a8dc4b8dc8112..abc7060fd4ecf81a78ea274f2cbb0ab6bc2e0676 100644 (file)
@@ -1218,7 +1218,7 @@ init(int argc, char *argv[])
        strptr = salloc(0);
        divxyz = salloc(0);
        stkbeg = stkptr = &stack[0];
-       stkend = &stack[STKSZ];
+       stkend = &stack[STKSZ-1];
        stkerr = 0;
        readptr = &readstk[0];
        k=0;