Skip to content

Commit

Permalink
Fix test wrt. deprecation of float to int conversions
Browse files Browse the repository at this point in the history
Instead of passing `1073746742.75` to an int parameter, we just do the
calculation upfront (and round up), since the actual calculation does
not matter here anyway.
  • Loading branch information
cmb69 committed May 9, 2022
1 parent 8e688e0 commit e9e2cf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/sysvshm/tests/bug72858.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != "WIN") { print "skip windows only"; }
<?php

$v1=100;
$v2=0xffffffff / 4 + 0x1337;
$v2=0x4fffffff + 0x1337;

This comment has been minimized.

Copy link
@guilliamxavier

guilliamxavier May 16, 2022

Contributor

even if "the actual calculation does not matter here anyway", "do the calculation upfront" should have given 0x3fffffff (or 0x40000000 if "round up")

This comment has been minimized.

Copy link
@cmb69

cmb69 May 16, 2022

Author Contributor

Oh, right, thanks! Fixed now.

shm_attach($v1,$v2);

?>
Expand Down

0 comments on commit e9e2cf0

Please sign in to comment.