diff --git a/h5p.classes.php b/h5p.classes.php index a6104313..f5f1e497 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -3754,7 +3754,7 @@ public function validateNumber(&$number, $semantics) { // Check if number is within allowed bounds even if step value is set. if (isset($semantics->step)) { $testNumber = $number - (isset($semantics->min) ? $semantics->min : 0); - $rest = $testNumber % $semantics->step; + $rest = fmod($testNumber, $semantics->step); if ($rest !== 0) { $number -= $rest; }