Fixed passing bool to message()

fix-squashed-planets
Tomasz Kapuściński 2022-08-13 17:18:14 +02:00
parent b5e27c9f19
commit 3c98af04b5
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,7 @@ public:
return LoadString(TX_NAN);
std::ostringstream s;
s << m_val;
s << std::boolalpha << m_val;
return s.str();
}

View File

@ -2859,6 +2859,7 @@ CBotTypResult CScriptFunctions::cMessage(CBotVar* &var, void* user)
{
if ( var == nullptr ) return CBotTypResult(CBotErrLowParam);
if ( var->GetType() != CBotTypString &&
var->GetType() != CBotTypBoolean &&
var->GetType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
var = var->GetNext();