diff options
-rw-r--r-- | common/str.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/str.h b/common/str.h index b9b269468f..5792692030 100644 --- a/common/str.h +++ b/common/str.h @@ -180,7 +180,7 @@ public: inline bool empty() const { return (_size == 0); } char lastChar() const { return (_size > 0) ? _str[_size-1] : 0; } - char operator [](int idx) const { + char operator[](int idx) const { assert(_str && idx >= 0 && idx < (int)_size); return _str[idx]; } |