about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-06-27 12:00:43 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-06-27 12:00:43 +0000
commitec1274f0a3c7f4d65ba7d1cda95a209159ed9ad4 (patch)
treef27d2255043a82739fdfa2d959672729d981aa81 /Src/utils.c
parentfbd93a2a824e38487d54ba7e37b1c85d19debaf2 (diff)
downloadzsh-ec1274f0a3c7f4d65ba7d1cda95a209159ed9ad4.tar.gz
zsh-ec1274f0a3c7f4d65ba7d1cda95a209159ed9ad4.tar.xz
zsh-ec1274f0a3c7f4d65ba7d1cda95a209159ed9ad4.zip
22522: infinite loop with invalid character in mb_metastrlen()
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 583945ac5..4b2f07f19 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3778,8 +3778,8 @@ mb_metastrlen(char *ptr)
 		/* Reset, treat as single character */
 		memset(&mb_shiftstate, 0, sizeof(mb_shiftstate));
 		ptr = laststart + (*laststart == Meta) + 1;
-	    } else
-		laststart = ptr;
+	    }
+	    laststart = ptr;
 	    num++;
 	    num_in_char = 0;
 	}