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.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index 8c7582b69e..8943fc3bb3 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -257,7 +257,11 @@ int CLua::loadfile(lua_State *ls, const char *filename, bool trusted,
std::string file = datafile_path(filename, die_on_fail);
if (file.empty())
- file = filename;
+ {
+ lua_pushstring(ls,
+ make_stringf("Can't find \"%s\"", filename).c_str());
+ return (-1);
+ }
return (luaL_loadfile(ls, file.c_str()));
}