BSD 4_1_snap release
[unix-history] / usr / src / cmd / expand.c
index a71c871..11d3073 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)expand.c    4.1 (Berkeley) 10/1/80";
+static char *sccsid = "@(#)expand.c    4.2 (Berkeley) 2/7/81";
 #include <stdio.h>
 /*
  * expand - expand tabs to equivalent spaces
 #include <stdio.h>
 /*
  * expand - expand tabs to equivalent spaces
@@ -101,7 +101,7 @@ bad:
                        fprintf(stderr, "Bad tab stop spec\n");
                        exit(1);
                }
                        fprintf(stderr, "Bad tab stop spec\n");
                        exit(1);
                }
-               if (nstops > 0 && i <= tabstops[nstops])
+               if (nstops > 0 && i <= tabstops[nstops-1])
                        goto bad;
                tabstops[nstops++] = i;
                if (*cp == 0)
                        goto bad;
                tabstops[nstops++] = i;
                if (*cp == 0)