Fixed GCC false positive. (#9508)
diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 2fe200f..062e26d 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp
@@ -3635,6 +3635,7 @@ const char* fmt_end = ImParseFormatFindEnd(fmt_start); if (fmt_end[0] == 0) // If we only have leading decoration, we don't need to copy the data. return fmt_start; + buf[0] = 0; // Fix false positive with caller assuming that buf could be non-initialized (#9508) ImStrncpy(buf, fmt_start, ImMin((size_t)(fmt_end - fmt_start) + 1, buf_size)); return buf; }