omadrm/drmhelper/src/drmhelper.cpp
branchRCL_3
changeset 10 89a1f2bd800d
parent 2 76350b5be3d8
child 12 8a03a285ab14
--- a/omadrm/drmhelper/src/drmhelper.cpp	Tue Feb 02 00:21:44 2010 +0200
+++ b/omadrm/drmhelper/src/drmhelper.cpp	Fri Feb 19 23:05:49 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -3587,16 +3587,16 @@
     {
     TInt index;
 
-    // MaxInt will fit into 10 characters
-    HBufC* b( HBufC::NewLC( 10 ) );
+    // MaxInt will fit into 11 characters
+    HBufC* b( HBufC::NewLC( 11 ) );
     b->Des().NumUC( aLocalId );
     HBufC* localIDBuf( b->ReAllocL( b->Des().Length() ) );
     CleanupStack::Pop( b );
     b = NULL;
     CleanupStack::PushL( localIDBuf );
 
-    // length of startparam is always 1 and 2 spaces are needed
-    TInt length = 1 + aUrl->Length() + localIDBuf->Des().Length() + 2;
+    // length of startparam is always 1 and some markers are needed
+    TInt length = 1 + aUrl->Length() + localIDBuf->Des().Length() + 4;
 
     aLaunchParam = HBufC::NewMaxL( length );
 
@@ -3604,7 +3604,7 @@
     ptr.SetLength( 0 );
     _LIT( KOne, "1" );
     _LIT( KTwo, "2" );
-    _LIT( KSpace, " " );
+    _LIT( KMarker, "\x00" );
 
     // start param is 1 for embedded launch and 2 for launching details view
     // standalone
@@ -3616,9 +3616,9 @@
         {
         ptr.Append( KTwo() );
         }
-    ptr.Append( KSpace() );
+    ptr.Append( KMarker() );
     ptr.Append( localIDBuf->Des() );
-    ptr.Append( KSpace() );
+    ptr.Append( KMarker() );
 
     index = ptr.Length();
     ptr.SetLength( length );
@@ -3627,6 +3627,8 @@
         ptr[index++] = ( unsigned char ) (*aUrl)[i];
         }
 
+    ptr.Append( KMarker() );
+    
     CleanupStack::PopAndDestroy( localIDBuf );
     }