summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-29 17:05:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-30 12:45:27 +0100
commit1d961ae75321cd04f40fcee8fae94c059fc466f1 (patch)
tree98e80bbe570ce61f8c0a3db84ce538606f03ac46 /sc
parent51572635f00748e0206844e34ce48d2f1f75acdb (diff)
ofz#4484 don't set mnRangeOpPosInSymbol on StringOverflow case
Change-Id: I35d86c97e4fb082a676a5eeadf8375738cecd7bd Reviewed-on: https://gerrit.libreoffice.org/45519 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 65780e5ad1e2..dce7841b80cd 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2214,14 +2214,16 @@ Label_MaskStateMachine:
{
// One range operator may form Sheet1.A:A, which we need to
// pass as one entity to IsReference().
- mnRangeOpPosInSymbol = pSym - &cSymbol[0];
if( pSym == &cSymbol[ MAXSTRLEN ] )
{
SetError(FormulaError::StringOverflow);
eState = ssStop;
}
else
+ {
+ mnRangeOpPosInSymbol = pSym - &cSymbol[0];
*pSym++ = c;
+ }
}
else if ( 128 <= c || '\'' == c )
{ // High values need reparsing with i18n,