aboutsummaryrefslogtreecommitdiff
path: root/src/lj_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_load.c')
-rw-r--r--src/lj_load.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_load.c b/src/lj_load.c
index 828bf8ae..24b660a8 100644
--- a/src/lj_load.c
+++ b/src/lj_load.c
@@ -122,8 +122,9 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
122 copyTV(L, L->top-1, L->top); 122 copyTV(L, L->top-1, L->top);
123 } 123 }
124 if (err) { 124 if (err) {
125 const char *fname = filename ? filename : "stdin";
125 L->top--; 126 L->top--;
126 lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(err)); 127 lua_pushfstring(L, "cannot read %s: %s", fname, strerror(err));
127 return LUA_ERRFILE; 128 return LUA_ERRFILE;
128 } 129 }
129 return status; 130 return status;