basic/source/inc/scanner.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 5bb823073f9df786eb6dbaaec71f572b2059e818 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jun 22 15:56:53 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Jun 22 20:08:57 2022 +0200 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 <caol...@redhat.com> 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();