[colobot] 46/377: Fixed class declaration change
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:33:56 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 b0dbb11fac45f8c046fbb709def95cf0aa64119c
Author: melex750 <melex750 at users.noreply.github.com>
Date: Sat Nov 21 13:49:49 2015 +0100
Fixed class declaration change
see #540
---
src/CBot/CBotFunction.cpp | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/CBot/CBotFunction.cpp b/src/CBot/CBotFunction.cpp
index 4ef4021..ff92ba4 100644
--- a/src/CBot/CBotFunction.cpp
+++ b/src/CBot/CBotFunction.cpp
@@ -1639,7 +1639,23 @@ CBotClass* CBotClass::Compile(CBotToken* &p, CBotCStack* pStack)
if ( IsOfType( p, ID_EXTENDS ) )
{
- IsOfType(p, TokenTypVar); // necessarily
+ // TODO: Not sure how correct is that - I have no idea how the precompilation (Compile1 method) works ~krzys_h
+ CBotString name = p->GetString();
+ CBotClass* pPapa = CBotClass::Find(name);
+
+ if (!IsOfType(p, TokenTypVar) || pPapa == nullptr)
+ {
+ pStack->SetError( TX_NOCLASS, p );
+ return nullptr;
+ }
+ pOld->m_pParent = pPapa;
+ }
+ else
+ {
+ if (pOld != nullptr)
+ {
+ pOld->m_pParent = nullptr;
+ }
}
IsOfType( p, ID_OPBLK); // necessarily
--
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