summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_crawl.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-10-04 15:08:35 -0400
committerNeil Moore <neil@s-z.org>2012-10-04 15:08:35 -0400
commit5af33eb5a08c6dfb4dc4cfb6e38a15a0cda2aa5b (patch)
tree9056731a06b8f51a8efed4d63d3041a888afe522 /crawl-ref/source/l_crawl.cc
parent522fc6560878ea40e6f5e4f02a51c4b89c317ade (diff)
downloadcrawl-ref-5af33eb5a08c6dfb4dc4cfb6e38a15a0cda2aa5b.tar.gz
crawl-ref-5af33eb5a08c6dfb4dc4cfb6e38a15a0cda2aa5b.zip
Fix crawl.split() crash (oops).
Diffstat (limited to 'crawl-ref/source/l_crawl.cc')
-rw-r--r--crawl-ref/source/l_crawl.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/l_crawl.cc b/crawl-ref/source/l_crawl.cc
index 609cca207f..d3bbe2b369 100644
--- a/crawl-ref/source/l_crawl.cc
+++ b/crawl-ref/source/l_crawl.cc
@@ -617,6 +617,7 @@ static int crawl_split(lua_State *ls)
vector<string> segs = split_string(token, s);
if (lua_isboolean(ls, 3) && lua_toboolean(ls, 3))
reverse(segs.begin(), segs.end());
+ lua_newtable(ls);
for (int i = 0, count = segs.size(); i < count; ++i)
{
lua_pushstring(ls, segs[i].c_str());