basic/source/comp/loops.cxx | 5 +++++ 1 file changed, 5 insertions(+) New commits: commit 7199f8c91fea3d3812b08539274eb3e73a7af69c Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Oct 21 09:25:15 2019 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Oct 21 10:18:33 2019 +0200
tdf#128263: update push positions in single line IF The positions (including current line) might have changed in Next(), even though it's "single line IF", due to line continuation char _. nP* members haven't been updated yet, so next call to Next() after Push() would restore wrong positions. I didn't store values of nLine/nCol1/nCol2 before if( IsEoln( Next() ) ), (doing which would allow to mimic Peek() behaviour), because I don't see how restoring their old values in the single line IF case would affect the logic. Possibly something to do later. Change-Id: I5a2a5c307ccbba77e9c02db50a04e33d71cd15a8 Reviewed-on: https://gerrit.libreoffice.org/81204 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index 40ac10bad9fc..daf7182fc3db 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -107,6 +107,11 @@ void SbiParser::If() bSingleLineIf = true; nEndLbl = aGen.Gen( SbiOpcode::JUMPF_, 0 ); Push( eCurTok ); + // tdf#128263: update push positions to correctly restore in Next() + nPLine = nLine; + nPCol1 = nCol1; + nPCol2 = nCol2; + while( !bAbort ) { if( !Parse() ) break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits