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 | 89a7743c1c6dbfe57c70b15ec948ade582925d3e (patch) | |
| tree | 59a5f57f2b61cacd2f7f92ccfafcff7a3c254af2 | |
| parent | 590135ce9a1cb629c9cc31c9c528feac3885f7fc (diff) | |
small changes
| -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;
}
|
