fixed bug: if unsupported ent type, returns empty vector

This commit is contained in:
suhrke 2017-07-05 03:21:51 -07:00
parent e4412bcdaa
commit d47b0af646
2 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,10 @@ EntityConverter::convert(std::vector<std::string> lines)
else {
throw std::runtime_error( "error: related entities must be matched prior to conversion" );
}
// If unsupported entity, return empty vector
std::vector<std::string> empty;
return empty;
}

View File

@ -64,6 +64,7 @@ class EntityConverter
* Description: Converts a single entity from reflex to xonotic format
* Parameter: vector of strings lines, lines that comprise a single entity
* Return: vector of strings, single entity in the converted format
* *IF entity is not supported, returns EMPTY vector
* THROWS: runtime_error on malformed .map file
* THROWS: runtime_error when called before related entities are matched
*--------------------------------------------------------------------------------------