|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-17 14:22 UTC] mattwil@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 19:00:01 2025 UTC |
Description: ------------ on a 64bit system the following var_dump(1%4294967295); should return 1, but returns 0. The problem is in the ZEND_API int mod_function(...) in zend_operators.c A call is made to abs which expects a 32bit int and returns a 32bit int, but 4294967295 is > 32 bits in size so the abs call returns an incorrect value. A proposed fix is to change the line "if (abs(op2->value.lval) == 1) {" to "if (op2->value.lval == 1 || op2->value.lval == -1) {"