diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-02-12 20:17:22 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-02-12 20:17:22 +0000 |
commit | 6b3f923fe237348c594e8271141f6a12c5fb327d (patch) | |
tree | 15a378391949ccd255fc3422eba35e7fef18a026 /winsup/cygwin/regex/regcomp.c | |
parent | 492f1c34314adfa6be20b27ed4b4eba8fd6c5390 (diff) | |
download | cygnal-6b3f923fe237348c594e8271141f6a12c5fb327d.tar.gz cygnal-6b3f923fe237348c594e8271141f6a12c5fb327d.tar.bz2 cygnal-6b3f923fe237348c594e8271141f6a12c5fb327d.zip |
* regex/regcomp.c (wgetnext): Use size_t as type for n2 since that's
what's returned by mbrtowc.
* regex/regexec.c (xmbrtowc): Ditto.
Diffstat (limited to 'winsup/cygwin/regex/regcomp.c')
-rw-r--r-- | winsup/cygwin/regex/regcomp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c index c5e68a2b5..3556dddd8 100644 --- a/winsup/cygwin/regex/regcomp.c +++ b/winsup/cygwin/regex/regcomp.c @@ -1152,7 +1152,8 @@ wgetnext(struct parse *p) else if (sizeof (wchar_t) == 2 && wc >= 0xd800 && wc <= 0xdbff) { /* UTF-16 surrogate pair. Fetch second half and compute UTF-32 value */ - int n2 = mbrtowc(&wc, p->next + n, p->end - p->next - n, &mbs); + size_t n2 = mbrtowc(&wc, p->next + n, + p->end - p->next - n, &mbs); if (n2 == 0 || n2 == (size_t)-1 || n2 == (size_t)-2) { SETERROR(REG_ILLSEQ); return (0); |