On 5/22/06, Enrico Tröger enrico.troeger@uvena.de wrote:
On Mon, 22 May 2006 01:19:08 +0200, Pierre pierre.php@gmail.com wrote:
Hello,
Hi,
A little fix fpr utils_strtod. It should use integer if it needs to test values lower than 0 (<= 0 incl.). A better fix would be to use
when gets i lower than 0? I think unsigned int is ok. When i is lower than 0, there must be a bigger problem than the integer underflow ;-). (correct me if I'm wrong)
I sent my reply too early. Here is a little example (values of i using 6 chars): 5 4 3 2 1 0 FFFFFFFF
The last line would actually be "-1" but it is not. It is out of the int range, on many platform it will be seen as a positive integer.
I hope I'm more clear now :)
Cheers, --Pierre