diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/smallvec_type.hpp | 6 | ||||
-rw-r--r-- | src/network/network_content_gui.cpp | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 38fa6fe6e..5e4e17365 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -225,7 +225,8 @@ public: */ FORCEINLINE const T *Get(uint index) const { - assert(index < this->items); + /* Allow access to the 'first invalid' item */ + assert(index <= this->items); return &this->data[index]; } @@ -237,7 +238,8 @@ public: */ FORCEINLINE T *Get(uint index) { - assert(index < this->items); + /* Allow access to the 'first invalid' item */ + assert(index <= this->items); return &this->data[index]; } diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index b179e2091..7d3c223db 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -435,9 +435,6 @@ public: void DrawMatrix(const Rect &r) const { - /* Is there something to do? */ - if (this->content.Length() == 0) return; - const NWidgetBase *nwi_checkbox = this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX); const NWidgetBase *nwi_name = this->GetWidget<NWidgetBase>(NCLWW_NAME); const NWidgetBase *nwi_type = this->GetWidget<NWidgetBase>(NCLWW_TYPE); |