]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/sscanf.c.patch
4d09cc90c46965306e34c48256a00462974b3959
[apple/libc.git] / stdio / FreeBSD / sscanf.c.patch
1 Index: sscanf.c
2 ===================================================================
3 RCS file: /cvs/root/Libc/stdio/FreeBSD/sscanf.c,v
4 retrieving revision 1.2
5 diff -u -d -b -w -u -r1.2 sscanf.c
6 --- sscanf.c 2003/05/20 22:22:44 1.2
7 +++ sscanf.c 2003/06/03 06:56:38
8 @@ -66,6 +66,12 @@
9 struct __sFILEX extra;
10 FILE f;
11
12 +#if defined(__APPLE_PR3275149_HACK__)
13 + /* If the string is NULL and we're using the broken Jaguar behavior, there's no sense in proceeding any further since we know we can return 0 */
14 + if (str && str[0] == '\0')
15 + return 0;
16 +#endif
17 +
18 f._file = -1;
19 f._flags = __SRD;
20 f._bf._base = f._p = (unsigned char *)str;