--- a/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -690,11 +690,14 @@
HBufC*& aReturnedInput )
{
TBool retVal;
-
- // defInput is not modified by the dialog.
- TPtr defInput( (TUint16*) aDefaultInput.Ptr(), aDefaultInput.Length(),
- KMaxAltTextLength );
-
+ TInt length = aDefaultInput.Length();
+ if ( aDefaultInput.Length() > KMaxAltTextLength )
+ {
+ length = KMaxAltTextLength;
+ }
+ // defInput is not modified by the dialog.Truncate if length is greater than KMaxAltTextLength
+ TPtr defInput( (TUint16*) aDefaultInput.Ptr(), length, KMaxAltTextLength );
+
CBrowserScriptPromptDialog* dialog =
new (ELeave) CBrowserScriptPromptDialog( defInput, aReturnedInput );