Minor correction to the new "repeat <steps> ... endrepeat" function for
tech files, as the first implementation was repeating one too many times. Also: The wrong type was being read for the number of steps, although the resulting value was correct.
This commit is contained in:
parent
ecd6ec56ae
commit
2929ef583e
|
|
@ -617,15 +617,17 @@ TechLoad(filename, initmask)
|
||||||
/* "repeat <number>" reads the lines until "endrepeat" <number> times */
|
/* "repeat <number>" reads the lines until "endrepeat" <number> times */
|
||||||
else if ((argc == 2) && (!strcmp(argv[0], "repeat")))
|
else if ((argc == 2) && (!strcmp(argv[0], "repeat")))
|
||||||
{
|
{
|
||||||
char *endptr;
|
|
||||||
repeatcount = (off_t)strtol(argv[1], &endptr, 0);
|
if (!StrIsInt(argv[1]))
|
||||||
if (*endptr != '\0')
|
|
||||||
{
|
{
|
||||||
TechError("Error: \"repeat\" with invalid count %s\n", argv[1]);
|
TechError("Error: \"repeat\" with invalid count %s\n", argv[1]);
|
||||||
repeatcount = 0;
|
repeatcount = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
repeatcount = atoi(argv[1]) - 1;
|
||||||
repeatpos = ftell(fstack->file);
|
repeatpos = ftell(fstack->file);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue