Fix "new" keyword syntax checking

master
melex750 2016-06-24 17:03:50 -04:00
parent 66984a4bb3
commit 51665e8396
1 changed files with 5 additions and 1 deletions

View File

@ -50,7 +50,11 @@ CBotInstr* CBotNew::Compile(CBotToken* &p, CBotCStack* pStack)
if (!IsOfType(p, ID_NEW)) return nullptr;
// verifies that the token is a class name
if (p->GetType() != TokenTypVar) return nullptr;
if (p->GetType() != TokenTypVar)
{
pStack->SetError(CBotErrBadNew, p);
return nullptr;
}
CBotClass* pClass = CBotClass::Find(p);
if (pClass == nullptr)