[colobot] 127/145: Fix "new" keyword syntax checking
Didier Raboud
odyx at moszumanska.debian.org
Mon Jul 11 12:56:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 51665e8396800391fdc9a7eb20df824ab28ed033
Author: melex750 <melex750 at users.noreply.github.com>
Date: Fri Jun 24 17:03:50 2016 -0400
Fix "new" keyword syntax checking
---
src/CBot/CBotInstr/CBotNew.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/CBot/CBotInstr/CBotNew.cpp b/src/CBot/CBotInstr/CBotNew.cpp
index 7da8e41..a302b39 100644
--- a/src/CBot/CBotInstr/CBotNew.cpp
+++ b/src/CBot/CBotInstr/CBotNew.cpp
@@ -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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list