From a9269e410a61d196396fb9c10bb577853adbc9c6 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Mon, 28 Oct 2013 13:14:46 +0100 Subject: VCL: I18NStatus::setStatusText shouldn't depend on aStr[len] == 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifa0770eb24df4ae4c7c058b980545a9094bbdf50 Reviewed-on: https://gerrit.libreoffice.org/6461 Reviewed-by: Noel Grandin Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/unx/generic/app/i18n_status.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/unx') diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index f58add57c5c3..bc89b6e47ef8 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -587,7 +587,7 @@ void I18NStatus::setStatusText( const OUString& rText ) /* * #93614# convert fullwidth ASCII forms to ascii */ - int nChars = rText.getLength()+1; + int nChars = rText.getLength(); sal_Unicode* pBuffer = (sal_Unicode*)alloca( nChars*sizeof( sal_Unicode ) ); for( int i = 0; i < nChars; i++ ) { @@ -596,7 +596,7 @@ void I18NStatus::setStatusText( const OUString& rText ) else pBuffer[i] = rText[i]; } - OUString aText( pBuffer ); + OUString aText( pBuffer, nChars ); m_pStatusWindow->setText( aText ); m_pStatusWindow->setPosition( m_pParent ); -- cgit