Re: Re: php4 /ext/standard file.c formatted_print.c
| From: | Moriyoshi Koizumi | Date: | Sat, 11 Jan 2003 23:03:19 +0000 |
| Subject: | Re: Re: php4 /ext/standard file.c formatted_print.c | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93350@lists.php.net to get a copy of this message | ||
On Sat, Jan 11, 2003 at 11:38:20PM +0100, nicos@php.net wrote:
> Sorry but just a thought, in that line:
>
> if (argc > 1 && (int)Z_STRLEN_P(return_value) < len / 2) {
>
> you're comparating len / 2 to an int, but len / 2 can be a float too no?
>
> Ignore me if I'm wrong...
>
Division on integers cannot result in floats without proper casting.
Anyway, I should always be conscious of how the cast operators work
in each context.
Moriyoshi