diff options
Diffstat (limited to 'WebCore/svg/SVGLength.cpp')
-rw-r--r-- | WebCore/svg/SVGLength.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/WebCore/svg/SVGLength.cpp b/WebCore/svg/SVGLength.cpp index 8168cf6..5377c7f 100644 --- a/WebCore/svg/SVGLength.cpp +++ b/WebCore/svg/SVGLength.cpp @@ -92,13 +92,9 @@ inline SVGLengthType stringToLengthType(const UChar*& ptr, const UChar* end) return LengthTypeNumber; const UChar firstChar = *ptr; - ++ptr; - if (firstChar == '%') { - if (ptr == end) - return LengthTypePercentage; - return LengthTypeUnknown; - } + if (++ptr == end) + return firstChar == '%' ? LengthTypePercentage : LengthTypeUnknown; const UChar secondChar = *ptr; |