summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 10:16:22 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 10:16:22 +0000
commit7f08a17be0d41c0cc37f6d1c98cf3f57d1925a00 (patch)
tree01e0fed909b7d12dacf9272284c414ef628fca79 /crawl-ref/source/clua.cc
parent11d76720c5424dac7b7bda1d8a484a4ea354eff5 (diff)
downloadcrawl-ref-7f08a17be0d41c0cc37f6d1c98cf3f57d1925a00.tar.gz
crawl-ref-7f08a17be0d41c0cc37f6d1c98cf3f57d1925a00.zip
[1819634] Fixed filenames missing in Lua file-not-found error messages.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2549 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r--crawl-ref/source/clua.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index 67428db271..5c6a3996d0 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -255,7 +255,9 @@ int CLua::loadfile(lua_State *ls, const char *filename, bool trusted,
return (-1);
}
- const std::string file = datafile_path(filename, die_on_fail);
+ std::string file = datafile_path(filename, die_on_fail);
+ if (file.empty())
+ file = filename;
return (luaL_loadfile(ls, file.c_str()));
}