summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/base/os.lua
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/genie/src/base/os.lua')
-rw-r--r--3rdparty/genie/src/base/os.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/3rdparty/genie/src/base/os.lua b/3rdparty/genie/src/base/os.lua
index 7d9351eaf58..ae88c0ad949 100644
--- a/3rdparty/genie/src/base/os.lua
+++ b/3rdparty/genie/src/base/os.lua
@@ -133,7 +133,7 @@
end
-- Identify the system
- local arch
+ local arch = ""
if _OS == "windows" then
arch = os.getenv("PROCESSOR_ARCHITECTURE")
elseif _OS == "macosx" then
@@ -142,13 +142,16 @@
arch = os.outputof("uname -m")
end
- -- Check our known 64-bit identifiers
- arch = arch:lower()
- for _, hosttype in ipairs(_64BitHostTypes) do
- if arch:find(hosttype) then
- return true
+ if nil ~= arch then
+ -- Check our known 64-bit identifiers
+ arch = arch:lower()
+ for _, hosttype in ipairs(_64BitHostTypes) do
+ if arch:find(hosttype) then
+ return true
+ end
end
end
+
return false
end
@@ -292,4 +295,3 @@
-- remove this directory
builtin_rmdir(p)
end
-