diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-21 09:53:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-23 13:12:55 +0200 |
commit | 8396cce9b5d9a4e3cdccc558eb1b818460f0987a (patch) | |
tree | c573d21f50405516245cbfc11630c589a098a855 /include | |
parent | 763114f8b7a7705e1b28226da33bf00016ad7982 (diff) |
clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little
bit safer now.
This also fixes the assert and the comment in OUString::operator[]
about this.
Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl/ustring.hxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index ba8c3588aa58..45a7441f9591 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -417,11 +417,7 @@ public: @since LibreOffice 3.5 */ sal_Unicode operator [](sal_Int32 index) const { - assert(index >= 0 && index <= getLength()); - //TODO: should really check for < getLength(), but there is quite - // some clever code out there that violates this function's - // documented precondition and relies on s[s.getLength()] == 0 and - // that would need to be fixed first + assert(index >= 0 && index < getLength()); return getStr()[index]; } |