Marc Lehmann wrote:
> On Wed, Dec 29, 1999 at 04:43:20PM +1100, David Hodson <[EMAIL PROTECTED]> 
> > the value to check is loaded into a (signed) int variable, and strtol()
> > The easy workaround is to search for a four-byte string value instead.
> It would occur to me that the real problem is strtol overflowing. Why does
> strtol overflow at all? POSIX requires strtol to be able to convert _all_
> long values.

Well, specifying a magic of "0,long,0x802A5FD7" calls
which returns MAX_LONG (0x7FFFFFFF) (and presumably an error). strtoul()
might work better, but as I said, I didn't want to break anyone else's
magic numbers.

> Would specifying the right (signed) constant help?

Maybe. But bits is bits, you know.

> If you think all this should be documented somewhere, then you are
> definitely right ;)


David Hodson  --  [EMAIL PROTECTED]  --  this night wounds time

Reply via email to