提交 99fbf4cf 编写于 作者: R Rich Felker

make wide scanf %[ respect width

上级 00722515
......@@ -243,7 +243,7 @@ int vfwscanf(FILE *f, const wchar_t *fmt, va_list ap)
int gotmatch = 0;
for (;;) {
while (width) {
if ((c=getwc(f))<0) break;
if (in_set(p, c) == invert)
break;
......@@ -255,9 +255,10 @@ int vfwscanf(FILE *f, const wchar_t *fmt, va_list ap)
if (s) s+=l;
}
pos++;
width--;
gotmatch=1;
}
ungetwc(c, f);
if (width) ungetwc(c, f);
if (!gotmatch) goto match_fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册