Skip to content

Commit

Permalink
Fixed static analyzer warning "Pointer to local array 'overlay_buf' i…
Browse files Browse the repository at this point in the history
…s stored outside the scope". Technically not used outside that scope, but best to play nice.
  • Loading branch information
ocornut committed Apr 30, 2024
1 parent 50b2ff0 commit 558c57a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1316,9 +1316,9 @@ void ImGui::ProgressBar(float fraction, const ImVec2& size_arg, const char* over

// Default displaying the fraction as percentage string, but user can override it
// Don't display text for indeterminate bars by default
char overlay_buf[32];
if (!is_indeterminate || overlay != NULL)
{
char overlay_buf[32];
if (!overlay)
{
ImFormatString(overlay_buf, IM_ARRAYSIZE(overlay_buf), "%.0f%%", fraction * 100 + 0.01f);
Expand Down

0 comments on commit 558c57a

Please sign in to comment.