diff options
| -rw-r--r-- | xmake/core/project/target.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 3541aa626..837486b06 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1512,7 +1512,9 @@ function _instance:headerfiles(outputdir, only_deprecated) end pattern = path.pattern(pattern) if srcheader:match(pattern) then - table.remove(dstheaders, i) + if i <= #dstheaders then + table.remove(dstheaders, i) + end return true end end |
