Fixes ofz#385256118 Timeout on ImpEditEngine::InitScriptTypes. Previously, the script assignment algorithm could backtrack in certain cases where a script run ends with weak characters that should be included in the following run. Fuzz testing unearthed a case involving right-to-left override and a CJK combining mark, which caused the algorithm to make no progress and hang. The algorithm now always makes progress on each iteration. Change-Id: I4da138c51d391c152afcee2428c21dc762a2dafc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179888 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>