From 7f08a17be0d41c0cc37f6d1c98cf3f57d1925a00 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 25 Oct 2007 10:16:22 +0000 Subject: [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 --- crawl-ref/source/clua.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/clua.cc') 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())); } -- cgit v1.2.3-54-g00ecf