From 5534ce68a17aeeb0e1dff74297d85ff7af1b9f9e Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 26 Jun 2008 19:54:55 +0000 Subject: - MILESTONE: A widget is drawn on screen loaded straight from its XML description. Yippie. - XMLParser: Bugfixes. - ThemeParser: Support for default color values. svn-id: r32808 --- common/xmlparser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/xmlparser.cpp') 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"); -- cgit v1.2.3