this also includes a related fix for vswscanf's read function, which
was returning a spurious (uninitialized) character for empty strings.
}
if (width) ungetwc(c, f);
}
if (width) ungetwc(c, f);
- if (!gotmatch) goto match_fail;
+ if (!gotmatch)
+ if (c>=0) goto match_fail;
+ else goto input_fail;
if (*p==']') p++;
while (*p!=']') {
if (*p==']') p++;
while (*p!=']') {
f->rend = f->buf + k;
f->cookie = (void *)src;
f->rend = f->buf + k;
f->cookie = (void *)src;
+ if (!len || !k) return 0;
*buf = *f->rpos++;
return 1;
*buf = *f->rpos++;
return 1;