From 2929ef583eb6b391b2e48ab70c986c6392e2792d Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Mon, 2 Mar 2026 12:24:46 -0500 Subject: [PATCH] Minor correction to the new "repeat ... 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. --- VERSION | 2 +- utils/tech.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 85bfd89e..74d2eea1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.612 +8.3.613 diff --git a/utils/tech.c b/utils/tech.c index 70d9a107..ce0dd39c 100644 --- a/utils/tech.c +++ b/utils/tech.c @@ -617,15 +617,17 @@ TechLoad(filename, initmask) /* "repeat " reads the lines until "endrepeat" times */ else if ((argc == 2) && (!strcmp(argv[0], "repeat"))) { - char *endptr; - repeatcount = (off_t)strtol(argv[1], &endptr, 0); - if (*endptr != '\0') + + if (!StrIsInt(argv[1])) { TechError("Error: \"repeat\" with invalid count %s\n", argv[1]); repeatcount = 0; } else + { + repeatcount = atoi(argv[1]) - 1; repeatpos = ftell(fstack->file); + } continue; }