System loads are floats
authorSteven Barth <steven@midlink.org>
Sat, 31 Oct 2009 16:30:44 +0000 (16:30 +0000)
committerSteven Barth <steven@midlink.org>
Sat, 31 Oct 2009 16:30:44 +0000 (16:30 +0000)
libs/nixio/src/process.c

index 536acd7..f3bb2f4 100644 (file)
@@ -379,7 +379,7 @@ static int nixio_sysinfo(lua_State *L) {
 
        lua_createtable(L, 0, 3);
        for (int i=0; i<3; i++) {
-               lua_pushinteger(L, info.loads[i] / 65536.);
+               lua_pushnumber(L, info.loads[i] / 65536.);
                lua_rawseti(L, -2, i+1);
        }
        lua_setfield(L, -2, "loads");