diff options
| -rw-r--r-- | xmake/actions/package/local/main.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/package/remote/main.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/actions/package/local/main.lua b/xmake/actions/package/local/main.lua index 75c6b4d72..beaaa8862 100644 --- a/xmake/actions/package/local/main.lua +++ b/xmake/actions/package/local/main.lua @@ -32,7 +32,7 @@ function _package_binary(target) -- get the output directory local outputdir = option.get("outputdir") or config.buildir() local packagename = target:name():lower() - if bit.band(packagename:byte(2), 0xc0) == 0x80 then + if #packagename > 1 and bit.band(packagename:byte(2), 0xc0) == 0x80 then wprint("package(%s): cannot generate package, becauese it contains unicode characters!", packagename) return end @@ -88,7 +88,7 @@ function _package_library(target) -- get the output directory local outputdir = option.get("outputdir") or config.buildir() local packagename = target:name():lower() - if bit.band(packagename:byte(2), 0xc0) == 0x80 then + if #packagename > 1 and bit.band(packagename:byte(2), 0xc0) == 0x80 then wprint("package(%s): cannot generate package, becauese it contains unicode characters!", packagename) return end diff --git a/xmake/actions/package/remote/main.lua b/xmake/actions/package/remote/main.lua index 0e8383890..064141b56 100644 --- a/xmake/actions/package/remote/main.lua +++ b/xmake/actions/package/remote/main.lua @@ -32,7 +32,7 @@ function _package_remote(target) -- get the output directory local outputdir = option.get("outputdir") or config.buildir() local packagename = target:name():lower() - if bit.band(packagename:byte(2), 0xc0) == 0x80 then + if #packagename > 1 and bit.band(packagename:byte(2), 0xc0) == 0x80 then wprint("package(%s): cannot generate package, becauese it contains unicode characters!", packagename) return end |
