summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/lib/detect/check_cxsnippets.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua
index 310c55fa0..912345909 100644
--- a/xmake/modules/lib/detect/check_cxsnippets.lua
+++ b/xmake/modules/lib/detect/check_cxsnippets.lua
@@ -260,10 +260,9 @@ function main(snippets, opt)
if opt.binaryfind then
local content = io.readfile(binaryfile, {encoding = "binary"})
local match = content:match(opt.binaryfind)
- if match == nil then
- return false
+ if match then
+ return true, match
end
- return true, match
end
return true
end,