Merge pull request #1741 from NPatch/master

* Fixed obscure crash when bar width is equal to max width.
This commit is contained in:
Бранимир Караџић 2019-04-25 18:57:09 -07:00 committed by GitHub
commit 01b657cd7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ static bool bar(float _width, float _maxWidth, float _height, const ImVec4& _col
itemHovered |= ImGui::IsItemHovered();
ImGui::SameLine();
ImGui::InvisibleButton("", ImVec2(_maxWidth-_width, _height) );
ImGui::InvisibleButton("", ImVec2(bx::max(1.0f, _maxWidth-_width), _height) );
itemHovered |= ImGui::IsItemHovered();
ImGui::PopStyleVar(2);