summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-03 09:12:07 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-03 09:12:07 +0000
commite3ddef14a3959fe718d201732c25db0da42d18f3 (patch)
tree7b81cc6320f0aed5114f9ef83768e12064a6a467 /crawl-ref/source/clua.cc
parent37ab188047e3bf873cd86d66568081fb95ce17a6 (diff)
downloadcrawl-ref-e3ddef14a3959fe718d201732c25db0da42d18f3.tar.gz
crawl-ref-e3ddef14a3959fe718d201732c25db0da42d18f3.zip
Fix for compile failure on 32-bit g++
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9722 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r--crawl-ref/source/clua.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index bd2b8b85bb..6cd4b70183 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -2644,7 +2644,7 @@ static int monster_set(lua_State *ls)
if (!strcmp(attr, "beh")) {
const beh_type beh =
lua_isnumber(ls, 3) ?
- static_cast<beh_type>(lua_tonumber(ls, 3)) :
+ static_cast<beh_type>(luaL_checkint(ls, 3)) :
lua_isstring(ls, 3) ? behaviour_by_name(lua_tostring(ls, 3)) :
NUM_BEHAVIOURS;
if (beh != NUM_BEHAVIOURS)