Index: Source/core/svg/SVGTextContentElement.cpp |
diff --git a/Source/core/svg/SVGTextContentElement.cpp b/Source/core/svg/SVGTextContentElement.cpp |
index fb4420a70db01a1d478b87f52c0a0ede5b56abfe..5f672c54cfe170284e0ee0c9bc86ca0b321a74ee 100644 |
--- a/Source/core/svg/SVGTextContentElement.cpp |
+++ b/Source/core/svg/SVGTextContentElement.cpp |
@@ -121,7 +121,7 @@ PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGTextContentElement::getStartPositionO |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
- if (charnum > getNumberOfChars()) { |
+ if (charnum >= getNumberOfChars()) { |
exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("charnum", charnum, getNumberOfChars())); |
return nullptr; |
} |
@@ -134,7 +134,7 @@ PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGTextContentElement::getEndPositionOfC |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
- if (charnum > getNumberOfChars()) { |
+ if (charnum >= getNumberOfChars()) { |
exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("charnum", charnum, getNumberOfChars())); |
return nullptr; |
} |
@@ -147,7 +147,7 @@ PassRefPtrWillBeRawPtr<SVGRectTearOff> SVGTextContentElement::getExtentOfChar(un |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
- if (charnum > getNumberOfChars()) { |
+ if (charnum >= getNumberOfChars()) { |
exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("charnum", charnum, getNumberOfChars())); |
return nullptr; |
} |
@@ -160,7 +160,7 @@ float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState& |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
- if (charnum > getNumberOfChars()) { |
+ if (charnum >= getNumberOfChars()) { |
exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("charnum", charnum, getNumberOfChars())); |
return 0.0f; |
} |