Re: [HACKERS] Open 6.4 items

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Ivar Helbekkmo <tih(at)nhh(dot)no>
Cc: Paul A Vixie <vixie(at)vix(dot)com>, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Open 6.4 items
Date: 1998-10-09 21:20:22
Message-ID: 23787.907968022@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Ivar Helbekkmo <tih(at)nhh(dot)no> 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1998-10-09 21:37:58 Re: [HACKERS] PL compile warning messages
Previous Message Brook Milligan 1998-10-09 21:04:08 Re: [HACKERS] dynamic libraries