Division by zero in juce_textlayout


in TextLayout::createLayoutWithBalancedLineLengths , the division jmax (line1, line2) / jmin (line1, line2) is sometimes a division by zero.
I think the behaviour is correct even with that division by zero, but it is probably cleaner to have a check such as:

        const float prop = (line1 > 0 && line2 > 0) ? jmax (line1, line2) / jmin (line1, line2) : 1;

(I notice that because I often run my code with floating point exceptions turned on)


Cool, thanks for that, I’ll have a look!