Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group