Skip to content

Commit

Permalink
Update MatchLanguage.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn authored Nov 29, 2024
1 parent feb4ffa commit db557fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MatchBot/MatchLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const char* CMatchLanguage::Get(const char* Key)
if (gMatchBot.m_Language)
{
// If language variable has value
if (gMatchBot.m_Language->string)
if (gMatchBot.m_Language->string && (gMatchBot.m_Language->string[0U] != '\0'))
{
// If contain the given key
if (this->m_Data.find(Key) != this->m_Data.end())
Expand All @@ -89,7 +89,7 @@ const char* CMatchLanguage::Get(const char* Key)
if (this->m_Data[Key].find(gMatchBot.m_Language->string) != this->m_Data[Key].end())
{
// Return pointer
return this->m_Data[Key][gMatchBot.m_Language->string].c_str();
return this->m_Data[Key][gMatchBot.m_Language->string].c_str();
}
}
}
Expand Down

0 comments on commit db557fd

Please sign in to comment.