diff --git a/imgui.cpp b/imgui.cpp index 1eda26142cb2d..11cb2f291f411 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2250,16 +2250,12 @@ void ImGuiStorage::SetAllInt(int v) // Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" ImGuiTextFilter::ImGuiTextFilter(const char* default_filter) { + memset(this, 0, sizeof(*this)); if (default_filter) { ImStrncpy(InputBuf, default_filter, IM_ARRAYSIZE(InputBuf)); Build(); } - else - { - InputBuf[0] = 0; - CountGrep = 0; - } } bool ImGuiTextFilter::Draw(const char* label, float width)