Index: Source/WebCore/platform/graphics/TextRun.h |
=================================================================== |
--- Source/WebCore/platform/graphics/TextRun.h (revision 88778) |
+++ Source/WebCore/platform/graphics/TextRun.h (working copy) |
@@ -78,8 +78,8 @@ |
{ |
} |
- UChar operator[](int i) const { return m_characters[i]; } |
- const UChar* data(int i) const { return &m_characters[i]; } |
+ UChar operator[](int i) const { ASSERT(i >= 0 && i < m_len); return m_characters[i]; } |
+ const UChar* data(int i) const { ASSERT(i >= 0 && i < m_len); return &m_characters[i]; } |
const UChar* characters() const { return m_characters; } |
int length() const { return m_len; } |