From 3f10ee9003a867755cea8cb1c79d6d6805abfecf Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Wed, 3 Nov 2004 13:57:16 +0000 Subject: [PATCH] #267237 r=pedemonte, sr=blizzard (platform specific), a=mkaply OS/2 only - limit length of titlebar text to overcome OS bug --- widget/src/os2/nsWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/widget/src/os2/nsWindow.cpp b/widget/src/os2/nsWindow.cpp index 74c961a6328..20bba880aa7 100644 --- a/widget/src/os2/nsWindow.cpp +++ b/widget/src/os2/nsWindow.cpp @@ -3391,6 +3391,9 @@ NS_METHOD nsWindow::SetTitle(const nsAString& aTitle) nsAutoCharBuffer title; PRInt32 titleLength; WideCharToMultiByte(0, uchtemp, aTitle.Length(), title, titleLength); + if (titleLength > MAX_TITLEBAR_LENGTH) { + title.get()[MAX_TITLEBAR_LENGTH] = '\0'; + } ::WinSetWindowText(GetMainWindow(), title.get()); if (mChromeHidden) { /* If the chrome is hidden, set the text of the titlebar directly */