diff options
| -rw-r--r-- | loslib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loslib.c,v 1.38 2011/11/30 12:35:05 roberto Exp roberto $ | 2 | ** $Id: loslib.c,v 1.39 2012/05/23 15:37:09 roberto Exp roberto $ |
| 3 | ** Standard Operating System library | 3 | ** Standard Operating System library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -98,7 +98,7 @@ static int os_remove (lua_State *L) { | |||
| 98 | static int os_rename (lua_State *L) { | 98 | static int os_rename (lua_State *L) { |
| 99 | const char *fromname = luaL_checkstring(L, 1); | 99 | const char *fromname = luaL_checkstring(L, 1); |
| 100 | const char *toname = luaL_checkstring(L, 2); | 100 | const char *toname = luaL_checkstring(L, 2); |
| 101 | return luaL_fileresult(L, rename(fromname, toname) == 0, fromname); | 101 | return luaL_fileresult(L, rename(fromname, toname) == 0, NULL); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | 104 | ||
