From owner-svn-src-all@freebsd.org Fri Feb 23 03:18:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FBBAF217E8; Fri, 23 Feb 2018 03:18:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C36E568862; Fri, 23 Feb 2018 03:18:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE62B10ED8; Fri, 23 Feb 2018 03:18:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1N3IOlF028963; Fri, 23 Feb 2018 03:18:24 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1N3IOmX028961; Fri, 23 Feb 2018 03:18:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802230318.w1N3IOmX028961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 23 Feb 2018 03:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329854 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 329854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 03:18:25 -0000 Author: kevans Date: Fri Feb 23 03:18:24 2018 New Revision: 329854 URL: https://svnweb.freebsd.org/changeset/base/329854 Log: lualoader: shallowCopyTable => deepCopyTable I called it a shallow copy, but it wasn't really a shallow copy at all. Modified: head/stand/lua/core.lua head/stand/lua/menu.lua Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Fri Feb 23 03:11:43 2018 (r329853) +++ head/stand/lua/core.lua Fri Feb 23 03:18:24 2018 (r329854) @@ -286,11 +286,11 @@ function core.isSystem386() end -- This may be a better candidate for a 'utility' module. -function core.shallowCopyTable(tbl) +function core.deepCopyTable(tbl) local new_tbl = {} for k, v in pairs(tbl) do if type(v) == "table" then - new_tbl[k] = core.shallowCopyTable(v) + new_tbl[k] = core.deepCopyTable(v) else new_tbl[k] = v end Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Fri Feb 23 03:11:43 2018 (r329853) +++ head/stand/lua/menu.lua Fri Feb 23 03:18:24 2018 (r329854) @@ -222,7 +222,7 @@ menu.welcome = { return menu.welcome.swapped_menu end -- Shallow copy the table - menu_entries = core.shallowCopyTable(menu_entries) + menu_entries = core.deepCopyTable(menu_entries) -- Swap the first two menu entries menu_entries[1], menu_entries[2] =