diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_load.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_load.c b/src/lj_load.c index 90a61027..6c8ae9f1 100644 --- a/src/lj_load.c +++ b/src/lj_load.c | |||
| @@ -108,8 +108,9 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename, | |||
| 108 | copyTV(L, L->top-1, L->top); | 108 | copyTV(L, L->top-1, L->top); |
| 109 | } | 109 | } |
| 110 | if (err) { | 110 | if (err) { |
| 111 | const char *fname = filename ? filename : "stdin"; | ||
| 111 | L->top--; | 112 | L->top--; |
| 112 | lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(err)); | 113 | lua_pushfstring(L, "cannot read %s: %s", fname, strerror(err)); |
| 113 | return LUA_ERRFILE; | 114 | return LUA_ERRFILE; |
| 114 | } | 115 | } |
| 115 | return status; | 116 | return status; |
