Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.8.8/8.8.8) with ESMTP id RAA19754 for ; Fri, 9 Oct 1998 17:21:02 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA23789; Fri, 9 Oct 1998 17:20:22 -0400 (EDT) To: Tom Ivar Helbekkmo cc: Paul A Vixie , hackers@postgreSQL.org Subject: Re: [HACKERS] Open 6.4 items In-reply-to: Your message of 09 Oct 1998 22:38:37 +0200 <86hfxdcvxu.fsf@athene.nhh.no> Date: Fri, 09 Oct 1998 17:20:22 -0400 Message-ID: <23787.907968022@sss.pgh.pa.us> From: Tom Lane Tom Ivar Helbekkmo writes: > As far as I > can tell, the only actual error in Paul Vixie's code is that the two > lines you quote above should be: > else if (--size > 0) > *++dst = 0, dirty = 0; No, that's still wrong, because it will error out (jump to emsgsize) one byte sooner than it should. The loop is fundamentally broken because it wants to grab and zero a byte before it knows whether there are any digits for the byte. I think its behavior for an odd number of digits is wrong too, or at least pretty nonintuitive. I like my code a lot better ;-) regards, tom lane