fix bug whereby most atexit-registered functions got skipped
[musl] / src / stdio / vfscanf.c
index 64fa975..61b0edb 100644 (file)
@@ -103,6 +103,7 @@ int vfscanf(FILE *f, const char *fmt, va_list ap)
                }
                if (*p != '%' || p[1] == '%') {
                        p += *p=='%';
+                       shlim(f, 0);
                        c = shgetc(f);
                        if (c!=*p) {
                                shunget(f);