mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-03 14:52:11 +02:00
JsonParser::error(): Don't add trailing newline
This commit is contained in:
parent
6f5710e809
commit
466318b77b
@ -587,7 +587,12 @@ bool JsonParser::error(const std::string & message, bool warning)
|
||||
std::ostringstream stream;
|
||||
std::string type(warning ? " warning: " : " error: ");
|
||||
|
||||
stream << "At line " << lineCount << ", position " << pos - lineStart << type << message << "\n";
|
||||
if(errors != "")
|
||||
{
|
||||
// only add the line breaks between error messages so we don't have a trailing line break
|
||||
stream << "\n";
|
||||
}
|
||||
stream << "At line " << lineCount << ", position " << pos - lineStart << type << message;
|
||||
errors += stream.str();
|
||||
|
||||
return warning;
|
||||
|
Loading…
x
Reference in New Issue
Block a user