[Libreoffice-commits] .: vcl/win
Jan Holesovsky
kendy at kemper.freedesktop.org
Sun Oct 9 11:51:35 PDT 2011
vcl/win/source/window/salframe.cxx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 42b8e37570356beaded307fa744046a2ff40c0de
Author: Jan Holesovsky <kendy at suse.cz>
Date: Sun Oct 9 20:50:50 2011 +0200
Make the key names look better under wine.
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index cfe05d7..488ff47 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2429,10 +2429,9 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf,
if( nKeyLen > 0 )
{
- if( nKeyLen + rCount > nMaxSize )
- nKeyLen = nMaxSize - rCount;
- memcpy( pBuf+rCount, aKeyBuf, nKeyLen*sizeof( sal_Unicode ) );
- rCount += nKeyLen;
+ WCHAR *pW = aKeyBuf, *pE = aKeyBuf + nKeyLen;
+ while( *pW && (pW < pE) && (rCount < nMaxSize) )
+ pBuf[rCount++] = *pW++;
}
else // fall back to provided default name
{
More information about the Libreoffice-commits
mailing list