summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-09-11 18:47:08 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-09-12 01:45:30 +0200
commit18fa868f1424c9f859181dac4b5212ed7cb7dd0f (patch)
tree62f726cae48838b19cbbf1bf3be74f583a32a8d4 /svl
parent0439f66742b3b71e2a36c79a09e0943e51a37bde (diff)
svl: test lenght before access
Change-Id: Ia0f41da43f150cd664dd9d4b5adef4e387253bf8
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforscan.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 914a5532a222..a8492f0a39b4 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -236,7 +236,7 @@ private: // Private section
bool InsertSymbol( sal_uInt16 & nPos, svt::NfSymbolType eType, const OUString& rStr );
static inline bool StringEqualsChar( const OUString& rStr, sal_Unicode ch )
- { return rStr[0] == ch && rStr.getLength() == 1; }
+ { return rStr.getLength() == 1 && rStr[0] == ch; }
// Yes, for efficiency get the character first and then compare length
// because in most places where this is used the string is one char.