diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-06-22 15:56:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-06-22 20:08:57 +0200 |
commit | 5bb823073f9df786eb6dbaaec71f572b2059e818 (patch) | |
tree | 8af0f84f3db903aba97cf9b6700885efdc8c6079 /basic | |
parent | 7d5dcf5f547e29d61e788b88f7a3f7b4feafb6b2 (diff) |
crashtesting: assert seen with forum-mso-de-125088
where at restoring the SaveIndex the underlying aLine string had
been replaced, so the index is for a different string. Save and
restore the aLine too. Not entirely sure this is what we want,
but it does seem to be what this restoring code expects.
Change-Id: I25bd02fad72d9b0729b9504fe04416340d0e070a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136286
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/inc/scanner.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 3f2c7e2e2cff..2a1b48ffdda2 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -33,6 +33,7 @@ class SbiScanner { OUString aBuf; // input buffer OUString aLine; + OUString aSaveLine; sal_Int32 nLineIdx; sal_Int32 nSaveLineIdx; StarBASIC* pBasic; // instance for error callbacks @@ -80,8 +81,8 @@ public: sal_Int32 GetCol1() const { return nCol1; } void SetCol1( sal_Int32 n ) { nCol1 = n; } StarBASIC* GetBasic() { return pBasic; } - void SaveLine() { nSaveLineIdx = nLineIdx; } - void RestoreLine() { nLineIdx = nSaveLineIdx; } + void SaveLine() { aSaveLine = aLine; nSaveLineIdx = nLineIdx; } + void RestoreLine() { nLineIdx = nSaveLineIdx; aLine = aSaveLine; } void LockColumn(); void UnlockColumn(); bool DoesColonFollow(); |