Fix use of uninitialized variable
authorunc0rr
Sat, 15 Nov 2014 12:21:43 +0300
changeset 10496 ba166d4e66f3
parent 10495 6d61b44a5652
child 10497 c7c50f165946
Fix use of uninitialized variable
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Sat Nov 15 01:30:40 2014 +0300
+++ b/hedgewars/uScript.pas	Sat Nov 15 12:21:43 2014 +0300
@@ -1573,7 +1573,9 @@
         left:= lua_tointeger(L, 3);
         right:= lua_tointeger(L, 4);
         if n = 5 then
-            tryhard:= lua_toboolean(L, 5);
+            tryhard:= lua_toboolean(L, 5)
+        else
+            tryhard:= false;
         if gear <> nil then
             FindPlace(gear, fall, left, right, tryhard);
         if gear <> nil then