summaryrefslogtreecommitdiffstats
path: root/src/CBot
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2014-10-07 22:28:32 +0200
committerkrzys-h <krzys_h@interia.pl>2014-10-07 22:28:32 +0200
commit72b4228abe583cd953491575cf42bae17ff5e9d2 (patch)
tree744d3179da7d15e4ce14c4bd6c61cd95c1569602 /src/CBot
parent2770ee8927cb91419b1918f46228435026790cf6 (diff)
downloadcolobot-72b4228abe583cd953491575cf42bae17ff5e9d2.tar.gz
colobot-72b4228abe583cd953491575cf42bae17ff5e9d2.tar.bz2
colobot-72b4228abe583cd953491575cf42bae17ff5e9d2.zip
Fixed CBot debugger (#325)
Diffstat (limited to 'src/CBot')
-rw-r--r--src/CBot/CBotStack.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp
index 1679e5e..84472ac 100644
--- a/src/CBot/CBotStack.cpp
+++ b/src/CBot/CBotStack.cpp
@@ -787,8 +787,9 @@ void CBotStack::GetRunPos(const char* &FunctionName, int &start, int &end)
while (p->m_next != NULL)
{
+
if ( p->m_instr != NULL ) instr = p->m_instr;
- if ( p->m_bFunc == 1 ) funct = p->m_instr;
+ if ( p->m_bFunc == 1 && p->m_instr != NULL ) funct = p->m_instr;
if ( p->m_next->m_prog != prog ) break ;
if (p->m_next2 && p->m_next2->m_state != 0) p = p->m_next2 ;
@@ -807,7 +808,7 @@ void CBotStack::GetRunPos(const char* &FunctionName, int &start, int &end)
t = instr->GetToken();
start = t->GetStart();
- end = t->GetEnd();
+ end = t->GetEnd();
}
CBotVar* CBotStack::GetStackVars(const char* &FunctionName, int level)