Make ShowCodeLocation() show the full line with a LastColumn of 0

This commit is contained in:
Johannes Schmidt 2026-02-26 09:26:21 +01:00
parent 50b4bc5dce
commit 7d4af75189

View file

@ -80,8 +80,9 @@ void icinga::ShowCodeLocation(std::ostream& out, const DebugInfo& di, bool verbo
if (lineno == di.FirstLine)
start = di.FirstColumn - 1;
if (lineno == di.LastLine)
if (lineno == di.LastLine && di.LastColumn > 0) {
end = di.LastColumn;
}
if (start < 0) {
end -= start;