This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit a95f736cbea6f1efec41357532baa887fa4cd6aa
Author: krzys-h <krzy...@interia.pl>
Date:   Sat Jun 3 20:05:54 2017 +0200

    Fix delete(this.id), closes #925
---
 src/script/scriptfunc.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp
index 092ceca..8a77490 100644
--- a/src/script/scriptfunc.cpp
+++ b/src/script/scriptfunc.cpp
@@ -695,7 +695,11 @@ bool CScriptFunctions::rDelete(CBotVar* var, CBotVar* 
result, int& exception, vo
             CObjectManager::GetInstancePointer()->DeleteObject(obj);
         }
     }
-    return true;
+
+    // Returning "false" here makes sure the program doesn't try to keep 
executing if the robot just destroyed itself
+    // using delete(this.id)
+    // See issue #925
+    return false;
 }
 
 CBotTypResult compileSearch(CBotVar* &var, void* user, CBotTypResult 
returnValue)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to