summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_you.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/l_you.cc')
-rw-r--r--crawl-ref/source/l_you.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index 5893fe1dcd..79d4295b63 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -263,7 +263,7 @@ static int _you_gold(lua_State *ls)
{
const int new_gold = luaL_checkint(ls, 1);
const int old_gold = you.gold;
- you.gold = std::max(new_gold, 0);
+ you.set_gold( std::max(new_gold, 0) );
if (new_gold > old_gold)
you.attribute[ATTR_GOLD_FOUND] += new_gold - old_gold;
else if (old_gold > new_gold)