From be73a3e9e93b54fed4a132dfae3fa9afde75a69d Mon Sep 17 00:00:00 2001 From: david Date: Wed, 8 Feb 2012 22:28:06 +0000 Subject: [PATCH] Put the nselib/* loader at the front, not the end, of the loaders list. The loaders list determines the order in which places are checked for Lua modules. I had a problem on Windows when the nmap.exe directory contained WinPcap's packet.dll. There was a runtime error when liblua tried to open packet.dll instead of our packet.lua. This way we check for our own files first. --- nse_main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nse_main.lua b/nse_main.lua index 899c3b82a..b4b923f82 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -128,7 +128,7 @@ do -- Add loader to look in nselib/?.lua (nselib/ can be in multiple places) return "\n\tNSE failed to find "..name.." in search paths."; end end - insert(package.loaders, loader); + insert(package.loaders, 1, loader); end local script_database_type, script_database_path =