From 40aa90f732c16485591f43bcddc39cfca60f929e Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 19 Sep 2023 06:25:59 -1000 Subject: [PATCH] SCP: Fix source content address while issuing error message --- scp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scp.c b/scp.c index 74f70b09..5f871014 100644 --- a/scp.c +++ b/scp.c @@ -10144,12 +10144,14 @@ for (gptr = gbuf, reason = SCPE_OK; else { highr = lowr; if (*tptr == '[') { + const char *stptr = tptr; + if (lowr->depth <= 1) return sim_messagef (SCPE_ARG, "Invalid register depth specification: %s\n", tptr); tptr = get_range (NULL, tptr + 1, &low, &high, 10, lowr->depth - 1, ']'); if (tptr == NULL) - return sim_messagef (SCPE_ARG, "Invalid register depth specification: %s\n", tptr); + return sim_messagef (SCPE_ARG, "Invalid register depth specification: %s\n", stptr); } } if (*tptr && (*tptr++ != ','))