mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
Fix regression in 'return' introduced by 98e0fc94
This fixes two regression test failures in tests/functions.sh. src/cmd/ksh93/bltins/cflow.c: b_exit(): - The exit status should of course only be cropped to 8 bits if b_exit() will actually exit, not if it returns from a function. (cherry picked from commit 2d1e7f87551159c942b16de2a98dc72697988d26)
This commit is contained in:
parent
b5e52703e9
commit
40d0bdc287
1 changed files with 2 additions and 1 deletions
|
@ -70,7 +70,8 @@ done:
|
|||
/* return outside of function, dotscript and profile is exit */
|
||||
if(shp->fn_depth==0 && shp->dot_depth==0 && !sh_isstate(SH_PROFILE))
|
||||
pp->mode = SH_JMPEXIT;
|
||||
sh_exit((shp->savexit = n) & SH_EXITMASK);
|
||||
shp->savexit = n;
|
||||
sh_exit((pp->mode == SH_JMPEXIT) ? (n & SH_EXITMASK) : n);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue