diff options
Diffstat (limited to 'common/xmlparser.cpp')
-rw-r--r-- | common/xmlparser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp index 22b8b22e48..8ff93a4c59 100644 --- a/common/xmlparser.cpp +++ b/common/xmlparser.cpp @@ -61,10 +61,12 @@ bool XMLParser::parserError(const char *errorString, ...) { printf("%s%s%s\n", startFull ? "" : "...", endFull ? "" : "...", lineStr); + int cursor = MIN(_pos - lineStart, 70); + if (!startFull) - lineStart -= 3; + cursor += 3; - for (int i = 0; i < _pos - lineStart; ++i) + while (cursor--) printf(" "); printf("^\n"); |