diff options
author | Arnaud Versini <arnaud.versini@libreoffice.org> | 2013-10-28 13:14:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 11:18:50 +0000 |
commit | a9269e410a61d196396fb9c10bb577853adbc9c6 (patch) | |
tree | d5d37693007f53d6667228b6df1402f7e4ba38e1 /vcl/unx | |
parent | 47690627565bec866ea2de74b5504160479cff74 (diff) |
VCL: I18NStatus::setStatusText shouldn't depend on aStr[len] == 0
Change-Id: Ifa0770eb24df4ae4c7c058b980545a9094bbdf50
Reviewed-on: https://gerrit.libreoffice.org/6461
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/i18n_status.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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 ); |