f->rend = f->buf + k;
f->cookie = (void *)src;
- if (!len) return 0;
+ if (!len || !k) return 0;
*buf = *f->rpos++;
return 1;
}
-int vswscanf(const wchar_t *s, const wchar_t *fmt, va_list ap)
+int vswscanf(const wchar_t *restrict s, const wchar_t *restrict fmt, va_list ap)
{
unsigned char buf[256];
FILE f = {