summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/regex/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/regex/regexec.c')
-rw-r--r--winsup/cygwin/regex/regexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/regex/regexec.c b/winsup/cygwin/regex/regexec.c
index 788ef5eeb..ad12ada41 100644
--- a/winsup/cygwin/regex/regexec.c
+++ b/winsup/cygwin/regex/regexec.c
@@ -88,7 +88,7 @@ xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy)
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, s + nr, n - nr, mbs);
+ size_t n2 = mbrtowc(&wc, s + nr, n - nr, mbs);
if (n2 == 0 || n2 == (size_t)-1 || n2 == (size_t)-2) {
memset(mbs, 0, sizeof(*mbs));
if (wi != NULL)