From 40ed6a51b02abf49180d1a99d5614becf2c8f5e7 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 30 Dec 2015 11:07:31 +0100 Subject: [PATCH] Fixed ImGuITextBuffer::empty() - unused in core lib - from being utterly broken --- imgui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);