about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-05-29 21:06:40 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-05-29 21:06:40 +0000
commit71865fd36d5b352602cb4b7555dfd912b5819c64 (patch)
tree772ab01549d5c2da28243bf1a3600666d0565c33 /Src
parent4e5ac964e6b557733db89de33c5814e484350796 (diff)
downloadzsh-71865fd36d5b352602cb4b7555dfd912b5819c64.tar.gz
zsh-71865fd36d5b352602cb4b7555dfd912b5819c64.tar.xz
zsh-71865fd36d5b352602cb4b7555dfd912b5819c64.zip
27021: fix length of saved glob flags in pattern matching
Diffstat (limited to 'Src')
-rw-r--r--Src/pattern.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index d4941253c..8ac79546d 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -668,7 +668,8 @@ patcompswitch(int paren, int *flagp)
 {
     long starter, br, ender, excsync = 0;
     int parno = 0;
-    int flags, gfchanged = 0, savglobflags = patglobflags;
+    int flags, gfchanged = 0;
+    long savglobflags = (long)patglobflags;
     Upat ptr;
 
     *flagp = 0;
@@ -688,7 +689,7 @@ patcompswitch(int paren, int *flagp)
     br = patnode(P_BRANCH);
     if (!patcompbranch(&flags))
 	return 0;
-    if (patglobflags != savglobflags)
+    if (patglobflags != (int)savglobflags)
 	gfchanged++;
     if (starter)
 	pattail(starter, br);
@@ -777,7 +778,7 @@ patcompswitch(int paren, int *flagp)
 		    patadd((char *)&up, 0, sizeof(union upat), 0);
 		}
 	    } else {
-		patglobflags = savglobflags;
+		patglobflags = (int)savglobflags;
 	    }
 	}
 	newbr = patcompbranch(&flags);
@@ -792,7 +793,7 @@ patcompswitch(int paren, int *flagp)
 	    return 0;
 	if (gfnode)
 	    pattail(gfnode, newbr);
-	if (!tilde && patglobflags != savglobflags)
+	if (!tilde && patglobflags != (int)savglobflags)
 	    gfchanged++;
 	pattail(starter, br);
 	if (excsync)
@@ -831,7 +832,7 @@ patcompswitch(int paren, int *flagp)
 	 * a later branch happened to put the flags back.
 	 */
 	pattail(ender, patnode(P_GFLAGS));
-	patglobflags = savglobflags;
+	patglobflags = (int)savglobflags;
 	patadd((char *)&savglobflags, 0, sizeof(long), 0);
     }