From 5bd55c22c1bd3e4daed48f9c162557dc9161d4ac Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 6 Feb 2022 07:09:38 +0100 Subject: We know the length here Change-Id: I630b7fbda7c9ebf578e74260a0d67eea32e9e429 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129549 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- accessibility/source/standard/vclxaccessibleedit.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accessibility') diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index 87cfcdb62f30..d41c29737d62 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -135,7 +135,7 @@ OUString VCLXAccessibleEdit::implGetText() sal_Unicode cEchoChar = pEdit->GetEchoChar(); if ( !cEchoChar ) cEchoChar = '*'; - OUStringBuffer sTmp; + OUStringBuffer sTmp(aText.getLength()); aText = comphelper::string::padToLength(sTmp, aText.getLength(), cEchoChar).makeStringAndClear(); } -- cgit