浏览代码

Add trim to xml string parsing (#5611)

Kim Kulling 1 年之前
父节点
当前提交
e963a863ce
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      include/assimp/XmlParser.h

+ 2 - 0
include/assimp/XmlParser.h

@@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_IRRXML_WRAPPER
 
 #include <assimp/ai_assert.h>
+#include <assimp/StringUtils.h>
 #include <assimp/DefaultLogger.hpp>
 
 #include "BaseImporter.h"
@@ -447,6 +448,7 @@ inline bool TXmlParser<TNodeType>::getValueAsString(XmlNode &node, std::string &
     }
 
     text = node.text().as_string();
+    text = ai_trim(text);
 
     return true;
 }