From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16260 invoked from network); 23 Jan 2022 16:07:47 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 23 Jan 2022 16:07:47 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 4ess; Sun Jan 23 10:43:29 -0500 2022 Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id afc5b382 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Sun, 23 Jan 2022 07:16:14 -0800 (PST) Message-ID: <9D8D30876A965100ABCB967296080EA3@eigenstate.org> To: 9front@9front.org Date: Sun, 23 Jan 2022 10:16:13 -0500 From: ori@eigenstate.org In-Reply-To: <8EBA4C4DBE4E51D98D5F46A20255F163@arrow> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: generic enhancement proxy hardware Subject: Re: [9front] [PATCH] cc: fix incorrect octal range condition in mpatov Reply-To: 9front@9front.org Precedence: bulk Quoth Michael Forney : > > This does not have any adverse effect, since yylex never calls mpatov > with a string with leading 0 (and not 0x) that contains non-octal > digits, but the condition was wrong regardless. > --- > diff 108d74cb0a8d27e82550d2772ae64fd7748e151d f101ca1299eb8d3ccafc9190651e98486948ec0d > --- a/sys/src/cmd/cc/lex.c Fri Jan 7 02:37:02 2022 > +++ b/sys/src/cmd/cc/lex.c Sat Jan 22 17:05:27 2022 > @@ -982,7 +982,7 @@ > if(c == 'x' || c == 'X') > goto hex; > while(c = *s++) { > - if(c >= '0' || c <= '7') > + if(c >= '0' && c <= '7') > nn = n*8 + c-'0'; > else > goto bad; > applied, thanks