Drop excess +1

...as identified by Noel in the comment at
<https://gerrit.libreoffice.org/c/core/+/133841/3#message-e2b2c6daa41983c25d6fc758235b993d04e1c055>
"tdf#148299 Don't unmotivatedly mess with spaces in file names"

Change-Id: Ie118191ceb731ceef3ca92869a4fa8c05f5835e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133981
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2022-05-07 16:01:09 +02:00
parent 7d1511cfd8
commit ea2386b7ca

View file

@ -77,7 +77,7 @@ OUString CollapseWhiteSpaces(const OUString& sName)
{
const sal_Int32 nLen = sName.getLength();
const sal_Unicode cRef = ' ';
OUStringBuffer aBuf(nLen+1);
OUStringBuffer aBuf(nLen);
for (sal_Int32 i = 0; i<nLen; )
{
const sal_Unicode cCur = sName[i++];