From c05b97cc1bae37ef3d62156136341377d67ccecb Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 7 Aug 2024 15:11:37 +0800 Subject: Update vs201x_vcxproj.lua --- xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 4 ++-- 1 file 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 3ae2bd47c..23f685ed2 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 arg:sub(-1, -1) == "-" then + if args:endswith("-") then args = args:sub(1, -2) end - if args:find("a") then + if args:find("a", 1, true) then -- a will overwrite s and c vcxprojfile:print("Async", condition) elseif args == "sc" or args == "cs" then -- cgit v1.3.1