9front - general discussion about 9front
 help / color / mirror / Atom feed
From: telephil9@gmail.com
To: telephil9@gmail.com, 9front@9front.org
Subject: Re: [PATCH] fix APE sscanf [ specifier
Date: Thu, 7 May 2020 18:24:26 +0200	[thread overview]
Message-ID: <5DB1898309438D91CA8F93B4C6DAE45E@gmail.com> (raw)
In-Reply-To: <7BC56C4EE66212C553EFF6B020551A32@gmail.com>

Hi,

In addition, same patch applied to libstdio:
---

diff -r 8006152d13d2 sys/src/libstdio/vfscanf.c
--- a/sys/src/libstdio/vfscanf.c	Tue Apr 28 20:51:19 2020 -0700
+++ b/sys/src/libstdio/vfscanf.c	Thu May 07 18:15:29 2020 +0200
@@ -353,11 +353,13 @@
 			if(nn==0) return 0;
 			else goto Done;
 		}
-		if(!match(c, pat)) break;
+		if(!match(c, pat)){
+			nungetc(c, f);
+			return 0;
+		}
 		if(store) *s++=c;
 		nn++;
 	}
-	nungetc(c, f);
 Done:
 	if(store) *s='\0';
 	return 1;

---

Regards,
Philippe


  reply	other threads:[~2020-05-07 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07  7:49 telephil9
2020-05-07 16:24 ` telephil9 [this message]
2020-05-08 15:11   ` [9front] " ori
2020-05-09  6:40     ` telephil9
2020-05-09 22:13       ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5DB1898309438D91CA8F93B4C6DAE45E@gmail.com \
    --to=telephil9@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).