| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 1 Apr 1996 15:04:35 +0400 (MSD) |
| From: | "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net> |
| Message-Id: | <199604011104.PAA25710@video.yars.free.net> |
| To: | djgpp-workers AT delorie DOT com |
| Subject: | scanf fix |
This should fix the bug which caused scanf, sscanf etc return 0 instead of -1
--- doscan.c~ Wed Jan 24 05:31:46 1996
+++ doscan.c Mon Apr 1 14:49:48 1996
@@ -56,6 +56,8 @@
fileended = 0;
for (;;) switch (ch = *fmt++) {
case '\0':
+ if (fileended && nmatch==0)
+ return(-1);
return (nmatch);
case '%':
if ((ch = *fmt++) == '%')
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |