Fix mistake in recent fix for text editor overflow

This commit is contained in:
Campbell Barton 2020-06-09 17:39:43 +10:00 committed by Jeroen Bakker
parent 9a4d51c5d9
commit 46c3ef5715
Notes: blender-bot 2023-02-14 09:33:11 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 1 additions and 1 deletions

View File

@ -1501,7 +1501,7 @@ static bool vfont_to_curve(Object *ob,
}
else if (tb_scale.h == 0.0f) {
/* This is a horizontal overflow. */
if (longest_line_length > 0.0f) {
if (longest_line_length > tb_scale.w) {
/* We make sure longest line before it broke can fit here. */
float scale_to_fit = tb_scale.w / longest_line_length;
scale_to_fit -= FLT_EPSILON;