Fail gracefully when list is assigned to string field
This commit is contained in:
parent
7124c4d80d
commit
afc9783ec0
@ -4,6 +4,7 @@
|
||||
|
||||
- Bug 2564404: FatalWarnings has no effect with gmake target
|
||||
- Support links and libdirs for Visual Studio static libraries
|
||||
- Fail gracefully when list is assigned to string field
|
||||
|
||||
|
||||
-----
|
||||
|
@ -457,11 +457,17 @@
|
||||
-- The getter/setter implemention.
|
||||
--
|
||||
|
||||
local function accessor(name, value)
|
||||
local function accessor(name, value)
|
||||
local kind = premake.fields[name].kind
|
||||
local scope = premake.fields[name].scope
|
||||
local allowed = premake.fields[name].allowed
|
||||
|
||||
if (kind == "string" or kind == "path" and value) then
|
||||
if type(value) ~= "string" then
|
||||
error("string value expected", 3)
|
||||
end
|
||||
end
|
||||
|
||||
if (kind == "string") then
|
||||
return premake.setstring(scope, name, value, allowed)
|
||||
elseif (kind == "path") then
|
||||
|
Reference in New Issue
Block a user