diff options
Diffstat (limited to 'loslib.c')
-rw-r--r-- | loslib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loslib.c,v 1.46 2014/04/29 17:05:13 roberto Exp roberto $ | 2 | ** $Id: loslib.c,v 1.47 2014/10/01 11:54:56 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 | */ |
@@ -295,7 +295,8 @@ static int os_time (lua_State *L) { | |||
295 | 295 | ||
296 | 296 | ||
297 | static int os_difftime (lua_State *L) { | 297 | static int os_difftime (lua_State *L) { |
298 | lua_pushnumber(L, difftime((l_checktime(L, 1)), (l_checktime(L, 2)))); | 298 | double res = difftime((l_checktime(L, 1)), (l_checktime(L, 2))); |
299 | lua_pushnumber(L, (lua_Number)res); | ||
299 | return 1; | 300 | return 1; |
300 | } | 301 | } |
301 | 302 | ||