From efc71580eaa5bf9e809a4c35e7746a8f607bca54 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 7 Sep 2021 03:14:40 +0200 Subject: [PATCH] Fix Lua global leaks Fix unintended leaked globals in the clusterio and player_auth modules. --- packages/slave/modules/clusterio/serialize.lua | 2 +- plugins/player_auth/module/auth.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/slave/modules/clusterio/serialize.lua b/packages/slave/modules/clusterio/serialize.lua index ce937eb4..ac3cbceb 100644 --- a/packages/slave/modules/clusterio/serialize.lua +++ b/packages/slave/modules/clusterio/serialize.lua @@ -11,7 +11,7 @@ local function version_to_table(version) end -- 0.17 compatibility -local supports_bar, get_bar, has_bar, version +local supports_bar, get_bar, set_bar, version if (pcall(function() local mods = script.active_mods end)) then supports_bar = "supports_bar" get_bar = "get_bar" diff --git a/plugins/player_auth/module/auth.lua b/plugins/player_auth/module/auth.lua index d6fbe249..822a6c2b 100644 --- a/plugins/player_auth/module/auth.lua +++ b/plugins/player_auth/module/auth.lua @@ -1,7 +1,7 @@ local clusterio_api = require("modules/clusterio/api") local auth = {} -function open_dialog(player, url, code) +local function open_dialog(player, url, code) if player.gui.screen.player_auth_dialog then player.gui.screen.player_auth_dialog.destroy() end