diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2022-05-08 05:47:24 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2022-05-08 05:47:24 +0200 |
commit | 5615b53bbf3578a91bab8658b38d0352433510e7 (patch) | |
tree | bdf29751a810afd43ab7497d47229ba64d5707e8 /Src/pattern.c | |
parent | 514524ee7be382a740e53e2a7c0247f2d68d7730 (diff) | |
parent | 9529af723604dfe1c8152db11e1d216621c898d5 (diff) | |
download | zsh-5615b53bbf3578a91bab8658b38d0352433510e7.tar.gz zsh-5615b53bbf3578a91bab8658b38d0352433510e7.zip |
Update upstream source from tag 'upstream/5.8.1.3-test'
Update to upstream version '5.8.1.3-test'
with Debian dir db59cf6a81e7a92e349f815dc21759ccb7ed689a
Diffstat (limited to 'Src/pattern.c')
-rw-r--r-- | Src/pattern.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/pattern.c b/Src/pattern.c index c0e31b78e..e947d1216 100644 --- a/Src/pattern.c +++ b/Src/pattern.c @@ -320,6 +320,14 @@ typedef wint_t patint_t; */ static mbstate_t shiftstate; +/* See clear_mbstate() in params.c for the use of clear_shiftstate() */ + +/**/ +mod_export void +clear_shiftstate(void) { + memset(&shiftstate, 0, sizeof(shiftstate)); +} + /* * Multibyte version: it's (almost) as easy to return the * value as not, so do so since we sometimes need it.. @@ -1999,6 +2007,8 @@ charsub(char *x, char *y) if (ret == MB_INVALID || ret == MB_INCOMPLETE) { /* Error. Treat remainder as single characters */ + /* Reset the shift state for next time. */ + memset(&shiftstate, 0, sizeof(shiftstate)); return res + (y - x); } |