From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vultr.musolino.id.au ([45.76.123.158]) by ewsd; Thu Nov 15 19:48:12 EST 2018 Received: from 58.96.111.26 ([58.96.111.26]) by vultr; Fri Nov 16 11:47:35 EST 2018 Message-ID: From: Alex Musolino Date: Fri, 16 Nov 2018 11:17:25 +1030 To: 9front@9front.org Subject: Re: [9front] man rc patch In-Reply-To: BF76DDEC3ABAB8EB078F0BDE14A1B4FD@felloff.net 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: compliant hardware storage scripting generator > but thats not what the patch is doing :-) > > + if(star && 1<=n && n<=count(star)){ > + while(--n) star = star->next; > + a = newword(star->word, a); > + } > > this means for $"n where n is out of range, it would still > yield a null list. The condition is exactly the same as is in Xdol and it does work. I think you've misread it. In any case, your solution is almost certainly better. I did think about how to avoid the extraneous copying but didn't (an still don't) know enough of the rc internals to get there. -- Cheers, Alex Musolino