Aggiunto controllo sull'operatore []

git-svn-id: svn://10.65.10.50/trunk@281 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-09-23 08:07:28 +00:00
parent 772abbb205
commit 717bf35bc4

View File

@ -58,7 +58,7 @@ public:
operator const char*() const { return (const char*)_str; } // *(TString) -> _str
char& operator[](int i) // TString[i] -> _str[i]
{
CHECKD(i >= 0 && i < _size, "Bad string subscript: ", i);
CHECKD(i >= 0 && i <= _size, "Bad string subscript: ", i);
return _str[i];
}