Skip to content

Commit

Permalink
GetCharAdvance -1 set text_size.x=0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhobo63 committed Feb 25, 2022
1 parent 241e359 commit 51fcda3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions imgui/imgui_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,7 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons
const float char_width = GetCharAdvance(c);
if(char_width<0) {
text_size.x=0;
text_size.y=0;
return text_size;
break;
}
if (line_width + char_width >= max_width)
{
Expand Down
2 changes: 1 addition & 1 deletion src/bind-imgui.js

Large diffs are not rendered by default.

0 comments on commit 51fcda3

Please sign in to comment.