diff options
Diffstat (limited to 'Swiften/Parser/ExpatParser.cpp')
| -rw-r--r-- | Swiften/Parser/ExpatParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Parser/ExpatParser.cpp b/Swiften/Parser/ExpatParser.cpp index 8415c42..e4e66f2 100644 --- a/Swiften/Parser/ExpatParser.cpp +++ b/Swiften/Parser/ExpatParser.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2016 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -82,11 +82,11 @@ ExpatParser::~ExpatParser() { | |||
| 82 | XML_ParserFree(p->parser_); | 82 | XML_ParserFree(p->parser_); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | bool ExpatParser::parse(const std::string& data) { | 85 | bool ExpatParser::parse(const std::string& data, bool finalData) { |
| 86 | if (data.size() > std::numeric_limits<int>::max()) { | 86 | if (data.size() > std::numeric_limits<int>::max()) { |
| 87 | return false; | 87 | return false; |
| 88 | } | 88 | } |
| 89 | bool success = XML_Parse(p->parser_, data.c_str(), static_cast<int>(data.size()), false) == XML_STATUS_OK; | 89 | bool success = XML_Parse(p->parser_, data.c_str(), static_cast<int>(data.size()), finalData) == XML_STATUS_OK; |
| 90 | /*if (!success) { | 90 | /*if (!success) { |
| 91 | std::cout << "ERROR: " << XML_ErrorString(XML_GetErrorCode(p->parser_)) << " while parsing " << data << std::endl; | 91 | std::cout << "ERROR: " << XML_ErrorString(XML_GetErrorCode(p->parser_)) << " while parsing " << data << std::endl; |
| 92 | }*/ | 92 | }*/ |
Swift