summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r--crawl-ref/source/clua.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index 2bca2b3562..3f9c7b55b9 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -1510,10 +1510,14 @@ static int food_do_eat(lua_State *ls)
static int food_prompt_floor(lua_State *ls)
{
- bool eaten = false;
- if (!you.turn_is_over && (eaten = eat_from_floor()))
- burden_change();
- lua_pushboolean(ls, eaten);
+ int eaten = 0;
+ if (!you.turn_is_over)
+ {
+ eaten = eat_from_floor();
+ if ( eaten == 1 )
+ burden_change();
+ }
+ lua_pushboolean(ls, (eaten != 0));
return (1);
}