summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-07 15:12:40 +0800
committerGitHub <[email protected]>2024-08-07 15:12:40 +0800
commit02491fbb13d6139ba8c5ec7c4eb7dd5487380890 (patch)
treeb0ad35564b5a1c665c2387dc57ffe85bbd03fdc6
parentc05b97cc1bae37ef3d62156136341377d67ccecb (diff)
Update vs201x_vcxproj.lua
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
index 23f685ed2..21d4c6881 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
@@ -517,10 +517,10 @@ function _make_source_options_cl(vcxprojfile, flags, condition)
if flagstr:find("[%-/]EH[asc]+%-?") then
local args = flagstr:match("[%-/]EH([asc]+%-?)")
-- remove the last arg if flag endwith `-`
- if args:endswith("-") then
+ if args and args:endswith("-") then
args = args:sub(1, -2)
end
- if args:find("a", 1, true) then
+ if args and args:find("a", 1, true) then
-- a will overwrite s and c
vcxprojfile:print("<ExceptionHandling%s>Async</ExceptionHandling>", condition)
elseif args == "sc" or args == "cs" then