mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Fail assert if string is not found.
This commit is contained in:
parent
af84f318b6
commit
b8521b5224
1 changed files with 3 additions and 1 deletions
|
@ -176,8 +176,10 @@ void GameFlow::LoadGameFlowScript()
|
|||
|
||||
char const * GameFlow::GetString(const char* id)
|
||||
{
|
||||
if (m_translationsMap.find(id) == m_translationsMap.end())
|
||||
if (!ScriptAssert(m_translationsMap.find(id) != m_translationsMap.end(), std::string{ "Couldn't find string " } + id))
|
||||
{
|
||||
return "String not found";
|
||||
}
|
||||
else
|
||||
return m_translationsMap.at(string(id)).at(0).c_str();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue