From 9fe0e634e50ceeecfebca3c7bfe4aa046b8ee833 Mon Sep 17 00:00:00 2001
From: Gerard Patel <g.patel@wanadoo.fr>
Date: Sun, 23 Jul 2000 13:33:48 +0000
Subject: [PATCH] Fixed calculation of buffer length after switch of window
 text to unicode.

---
 controls/icontitle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controls/icontitle.c b/controls/icontitle.c
index 1e9fe27eb29..f209e5ab338 100644
--- a/controls/icontitle.c
+++ b/controls/icontitle.c
@@ -70,7 +70,7 @@ static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
 
     if( length )
     {
-	str = HeapAlloc( GetProcessHeap(), 0, length + 1 );
+	str = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR) );
 	lstrcpyW( str, wnd->owner->text );
 	while( str[length - 1] == ' ' ) /* remove trailing spaces */
 	{ 
-- 
GitLab