Browse Source

Fixed ImGuITextBuffer::empty() - unused in core lib - from being utterly broken

ocornut 9 years ago
parent
commit
40ed6a51b0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      imgui.h

+ 1 - 1
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);