coreutils

General Software Utilities
git clone http://git.omkov.net/coreutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2020-09-25 12:35:01
Commit02a966d641696b5992c93a07b9f4aa1b782f33f3
Parentfafac6a8dd579cd731784c439284d31bf352b2de

lib: Fix X flag setting s bit

Unintended switch statement fallthrough was causing the s permission to be set alongside the X permission

Diffstat

M src/lib/mode.c | 2 +-

1 files changed, 1 insertions, 1 deletions

diff --git a/src/lib/mode.c b/src/lib/mode.c
index e92add7..7388077 100644
--- a/src/lib/mode.c
+++ b/src/lib/mode.c
@@ -80,7 +80,7 @@ chmod_t *strmode(char *str) {
 				case 'r': { m[i].mod |= M_RD; ++s; continue; }
 				case 'w': { m[i].mod |= M_WR; ++s; continue; }
 				case 'x': { m[i].mod |= M_EX; ++s; continue; }
-				case 'X': { m[i].flag = MF_XIFX; }
+				case 'X': { m[i].flag = MF_XIFX; ++s; continue; }
 				case 's': { m[i].mod |= M_ID; ++s; continue; }
 				case 't': { m[i].mod |= M_ST; ++s; continue; }
 				default: { goto end; }