summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/rsatoc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c
index 6473802140..8f2eb8fded 100644
--- a/scripts/rsatoc.c
+++ b/scripts/rsatoc.c
@@ -471,10 +471,12 @@ int main(int argc, char *argv[])
path++;
if (!strncmp(path, "__ENV__", 7)) {
- path = getenv(path + 7);
+ const char *orig_path = path;
+
+ path = getenv(orig_path + 7);
if (!path) {
fprintf(stderr, "%s doesn't contain a path\n",
- path + 7);
+ orig_path + 7);
exit(1);
}
}