>From a7abb13613cb7b4cdcd1cb2d62ff8c54b39c6634 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 4 Jun 2014 15:42:22 +0000 Subject: [PATCH 2/2] Fix GS_NONE would be shifted into undefined value --- Src/glob.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/glob.c b/Src/glob.c index a62cfee..c6cb3d2 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -1619,9 +1619,10 @@ zglob(LinkList list, LinkNode np, int nountok) restore_globstate(saved); return; } + if ((sense & 2) && + (t & (GS_SIZE|GS_ATIME|GS_MTIME|GS_CTIME|GS_LINKS))) + t <<= GS_SHIFT; /* HERE: GS_EXEC? */ if (t != GS_EXEC) { - if ((sense & 2) && !(t & (GS_NAME|GS_DEPTH))) - t <<= GS_SHIFT; /* HERE: GS_EXEC? */ if (gf_sorts & t) { zerr("doubled sort specifier"); restore_globstate(saved); -- 1.7.10.4