From 87d99fce6bd2924bb48d2d4fd05318165dd88f17 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 19 Sep 2016 09:32:21 +0200 Subject: [PATCH] ImFont: CalcWordWrapPositionA() fixed font scaling with fallback character. (followup to 86666489df97d40edef64196db43963cd0ba335f) --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 45549298..27f8b8e5 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1841,7 +1841,7 @@ const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const c } } - const float char_width = ((int)c < IndexXAdvance.Size) ? IndexXAdvance[(int)c] * scale : FallbackXAdvance; + const float char_width = ((int)c < IndexXAdvance.Size ? IndexXAdvance[(int)c] : FallbackXAdvance) * scale; if (ImCharIsSpace(c)) { if (inside_word)