tdf#115353 layout fix

Change-Id: I085b330e6539adb8b924f4d7f4cd10fb593a0da6
Reviewed-on: https://gerrit.libreoffice.org/50257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 4404f3f..65bd59b 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1232,7 +1232,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
        rArgs.mnEndCharPos : rArgs.mnMinCharPos - 1;
    int nRunVisibleEndChar = pGlyphs[nFirstValid]->mnCharPos;
    // merge the fallback levels
    while( nValid[0] && (nLevel > 0))
    while( nValid[nFirstValid] && (nLevel > 0))
    {
        // find best fallback level
        for( n = 0; n < nLevel; ++n )
@@ -1267,7 +1267,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
                nStartOld[0] = nStartNew[0];
                nValid[nFirstValid] = mpLayouts[0]->GetNextGlyphs(1, &pGlyphs[nFirstValid], aPos, nStartNew[0]);

                if( !nValid[0] )
                if( !nValid[nFirstValid] )
                   break;
            }
        }