d2709c681f
Math.max(x / y, 0.5) will return infinite when y is 0. Fix that by using Math.min() which was the actual intent of the patch.