diff --git a/imgui.h b/imgui.h index 03d5011c..6045b7f3 100644 --- a/imgui.h +++ b/imgui.h @@ -892,7 +892,7 @@ struct ImGuiTextBuffer const char* begin() const { return &Buf.front(); } const char* end() const { return &Buf.back(); } // Buf is zero-terminated, so end() will point on the zero-terminator int size() const { return Buf.Size - 1; } - bool empty() { return Buf.Size >= 2; } + bool empty() { return Buf.Size <= 1; } void clear() { Buf.clear(); Buf.push_back(0); } const char* c_str() const { return Buf.Data; } IMGUI_API void append(const char* fmt, ...) IM_PRINTFARGS(2);