diff --git a/libs/main/types/pibitarray.h b/libs/main/types/pibitarray.h index 4723e0ab..189e2067 100644 --- a/libs/main/types/pibitarray.h +++ b/libs/main/types/pibitarray.h @@ -5,7 +5,7 @@ //! \~russian Упакованный массив битов /* PIP - Platform Independent Primitives - Packed bit array + Packed bit array Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify @@ -173,7 +173,10 @@ public: //! \~english Remove one bit from the end of array. //! \~russian Удаляет один бит с конца массива. - PIBitArray & pop_back() { return resize(size_ - 1); } + PIBitArray & pop_back() { + if (size_ == 0) return *this; + return resize(size_ - 1); + } //! \~english Remove one bit from the beginning of array. //! \~russian Удаляет один бит с начала массива.