wscanf: use WEOF instead of EOF
(cherry picked from commit ed63802432bffac5ea743c932bc2756fdd4d6c94)
diff --git a/mingw-w64-crt/stdio/mingw_wvfscanf.c b/mingw-w64-crt/stdio/mingw_wvfscanf.c
index 3924b54..41bdc68 100644
--- a/mingw-w64-crt/stdio/mingw_wvfscanf.c
+++ b/mingw-w64-crt/stdio/mingw_wvfscanf.c
@@ -237,7 +237,7 @@
static int
cleanup_return (int rval, struct gcollect **pfree, char **strp, wchar_t **wbuf)
{
- if (rval == EOF)
+ if (rval == WEOF)
release_ptrs (pfree, wbuf);
else
{
@@ -1326,7 +1326,7 @@
return cleanup_return (rval, &gcollect, pstr, &wbuf);
str_sz = 100;
if ((str = *pstr = (char *) malloc (100)) == NULL)
- return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf);
+ return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? WEOF : rval), &gcollect, pstr, &wbuf);
gcollect = resize_gcollect (gcollect);
gcollect->ptrs[gcollect->count++] = pstr;
}