diff options
author | Jordi Vilalta Prat <jordi.vilalta@gameloft.com> | 2016-04-25 15:46:58 +0200 |
---|---|---|
committer | Jordi Vilalta Prat <jordi.vilalta@gameloft.com> | 2016-04-25 15:46:58 +0200 |
commit | ee341369a1f3bb113e051154ddd3a9d78f5e30f6 (patch) | |
tree | 968f209b5ed415024e3054c7c3045a78293b9f97 /compat53 | |
parent | 2c732b8c8831e656863a40530de2548615fa1ceb (diff) | |
download | lua-compat-5.3-ee341369a1f3bb113e051154ddd3a9d78f5e30f6.tar.gz lua-compat-5.3-ee341369a1f3bb113e051154ddd3a9d78f5e30f6.tar.bz2 lua-compat-5.3-ee341369a1f3bb113e051154ddd3a9d78f5e30f6.zip |
Fix the return code of os.execute() on Windows.
Diffstat (limited to 'compat53')
-rw-r--r-- | compat53/module.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compat53/module.lua b/compat53/module.lua index c4fc515..dad940b 100644 --- a/compat53/module.lua +++ b/compat53/module.lua | |||
@@ -601,7 +601,10 @@ if lua_version < "5.3" then | |||
601 | if code == 0 then | 601 | if code == 0 then |
602 | return true, "exit", code | 602 | return true, "exit", code |
603 | else | 603 | else |
604 | return nil, "exit", code/256 -- only correct on Linux! | 604 | if package.config:sub(1, 1) == '/' then |
605 | code = code/256 -- only correct on Linux! | ||
606 | end | ||
607 | return nil, "exit", code | ||
605 | end | 608 | end |
606 | end | 609 | end |
607 | end | 610 | end |