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.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()));
}