Fix empty capture group reference
Searching for something like (foo)|(bar) and replacing with $1$2 would fail assertion in appendCopy in include/rtl/ustrbuf.hxx, because beginIndex is negative (-1), because one of the references is always empty (SearchResult at TextSearch::ReplaceBackReferences() has both startOffset and startOffset equal to -1). In this case, we should simply return an empty string. Change-Id: Ibf91b1d17ab21c279cfcdc31e84d0c2eae567a53 Reviewed-on: https://gerrit.libreoffice.org/62248 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Showing
Please
register
or
sign in
to comment