summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-15 11:48:47 +0000
committerAndras Timar <andras.timar@collabora.com>2017-11-27 12:55:07 +0100
commitac95841c345c414ddc2d20880302bce75b8e1096 (patch)
tree40658c62d6a8dc4924ac87d115a9d1946533569a
parent662f502d13f5108dc471ba8e26cd92ecbe036897 (diff)
ofz: special case max index for cSymbol
Change-Id: Ia5fb036196b0cff0739789e691a36d294660540b Reviewed-on: https://gerrit.libreoffice.org/44759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit a5550289a37950195b7a7e5b22cba79ce5b5a673) Reviewed-on: https://gerrit.libreoffice.org/44803 (cherry picked from commit 701e1ec3a2e38a7b0bd2cdd3511a2a50578ea74e)
-rw-r--r--sc/source/core/tool/compiler.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 69e33b128ea3..23b72f4bc8a7 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3267,6 +3267,8 @@ bool ScCompiler::IsReference( const OUString& rName, const OUString* pErrRef )
return true;
// Now try with a symbol up to the range operator, rewind source
// position.
+ if (mnRangeOpPosInSymbol == MAXSTRLEN-1)
+ return false;
sal_Int32 nLen = mnRangeOpPosInSymbol;
while (cSymbol[++nLen])
;