summaryrefslogtreecommitdiffstats
path: root/test/lua/inspect.lua
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:25 +0000
commitf59ea5f7690c9a01ef6f7f6508084a66c40b1dae (patch)
tree482ee255d71f113be6c62e9ff3543fd6ebb9f12a /test/lua/inspect.lua
parentReleasing progress-linux version 4.2.2-1.1~progress7.99u1. (diff)
downloadwireshark-f59ea5f7690c9a01ef6f7f6508084a66c40b1dae.tar.xz
wireshark-f59ea5f7690c9a01ef6f7f6508084a66c40b1dae.zip
Merging upstream version 4.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/lua/inspect.lua')
-rw-r--r--test/lua/inspect.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/lua/inspect.lua b/test/lua/inspect.lua
index 6b4aff9..2d96712 100644
--- a/test/lua/inspect.lua
+++ b/test/lua/inspect.lua
@@ -416,7 +416,10 @@ function inspect.marshal(inString, options)
inString = "return " .. inString
end
- local t = assert(loadstring(inString))()
+ -- loadstring was removed after Lua 5.1, load given a string
+ -- argument does the same thing
+ local load = (_VERSION == "Lua 5.1") and loadstring or load
+ local t = assert(load(inString))()
removeIndex(t)