Use `intdiv()` in `ExifUtil::simplifyRational()`
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 24 Apr 2023 12:19:24 +0000 (14:19 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 24 Apr 2023 12:19:24 +0000 (14:19 +0200)
wcfsetup/install/files/lib/util/ExifUtil.class.php

index 8878f5dee340f9024b59be698b87f4517a42c3ba..bdee394585bc09ad8bd9cd520ce44be60eabdc9d 100644 (file)
@@ -300,7 +300,7 @@ final class ExifUtil
         $denonimator = $data[1];
         $gcd = self::gcd($numerator, $denonimator);
 
-        return \sprintf('%d/%d', $numerator / $gcd, $denonimator / $gcd);
+        return \sprintf('%d/%d', \intdiv($numerator, $gcd), \intdiv($denonimator, $gcd));
     }
 
     /**