diff options
| author | ame <[email protected]> | 2025-02-13 01:27:10 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2025-02-13 01:27:10 -0600 |
| commit | f1a92a07efbc0dd17758500b2c91ca8ddbdeabca (patch) | |
| tree | 59a5f57f2b61cacd2f7f92ccfafcff7a3c254af2 /src | |
| parent | d0a9ade00ab795c6827cddb498dde73b819283a8 (diff) | |
small changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/lua.c | 2 | ||||
| -rw-r--r-- | src/net.c | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -58,7 +58,7 @@ void luaI_deepcopy(lua_State* src, lua_State* dest, enum deep_copy_flags flags){ switch(type = lua_type(src, -1)){
case LUA_TNUMBER:
n = lua_tonumber(src, -1);
- if(n == (int)n) lua_pushinteger(dest, (int)n);
+ if(n == (uint64_t)n) lua_pushinteger(dest, lua_tonumber(src, -1));
else lua_pushnumber(dest, n);
break;
case LUA_TSTRING:;
@@ -289,6 +289,7 @@ int i_ws_close(lua_State* L){ lua_pushstring(L, "_");
lua_gettable(L, 1);
struct wss_data* data = lua_touserdata(L, -1);
+
if(data != NULL){
str_free(data->buffer);
@@ -302,7 +303,7 @@ int i_ws_close(lua_State* L){ free(data);
}
- luaI_tsetlud(L, 1, "_", NULL);
+ data = NULL;
return 0;
}
|
