From c19389a20576042caf3a916dce0b3ee6d088bec9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Feb 2025 10:54:52 -0500 Subject: [PATCH] bug fix for pointing to the command name --- src/utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 940faa3eed..310669c241 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -234,9 +234,9 @@ std::string utils::point_to_error(Input *input, int failed) // construct and append error indicator line cmdline += '\n'; cmdline += std::string(indicator, ' '); - cmdline += std::string(strlen(input->arg[failed]) + quoted, '^'); + cmdline += std::string(strlen((failed < 0) ? input->command : input->arg[failed]) + + quoted, '^'); cmdline += '\n'; - } else { cmdline += lastline; cmdline += '\n';