mirror of https://github.com/Icinga/icinga2.git
parent
79a7a0be92
commit
b924941488
|
@ -34,8 +34,6 @@ using namespace icinga;
|
|||
do { \
|
||||
yylloc->Path = yyextra->GetPath(); \
|
||||
yylloc->FirstLine = yylineno; \
|
||||
if (yycolumn < 1) \
|
||||
yycolumn = 1; \
|
||||
yylloc->FirstColumn = yycolumn; \
|
||||
yylloc->LastLine = yylineno; \
|
||||
yylloc->LastColumn = yycolumn + yyleng - 1; \
|
||||
|
|
|
@ -94,6 +94,11 @@ void icinga::ShowCodeFragment(std::ostream& out, const DebugInfo& di, bool verbo
|
|||
if (lineno == di.LastLine)
|
||||
end = di.LastColumn;
|
||||
|
||||
if (start < 0) {
|
||||
end -= start;
|
||||
start = 0;
|
||||
}
|
||||
|
||||
out << String(pathInfo.GetLength(), ' ');
|
||||
out << String(start, ' ');
|
||||
out << String(end - start, '^');
|
||||
|
|
Loading…
Reference in New Issue