From eabfc05bbbfba39a6f78f023ac0fb4d2c9fdbc00 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 27 Aug 2021 10:41:25 +0200 Subject: [PATCH] Handle empty keys --- code/AssetLib/FBX/FBXParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/AssetLib/FBX/FBXParser.cpp b/code/AssetLib/FBX/FBXParser.cpp index 61e53c2d0..582940363 100644 --- a/code/AssetLib/FBX/FBXParser.cpp +++ b/code/AssetLib/FBX/FBXParser.cpp @@ -192,6 +192,10 @@ Scope::Scope(Parser& parser,bool topLevel) } const std::string& str = n->StringContents(); + if (str.empty()) { + ParseError("unexpected content: empty string."); + } + elements.insert(ElementMap::value_type(str,new_Element(*n,parser))); // Element() should stop at the next Key token (or right after a Close token)