utilitylibraries/libutils/src/wchartodescriptor8.cpp
branchRCL_3
changeset 57 2efc27d87e1c
parent 56 acd3cd4aaceb
equal deleted inserted replaced
56:acd3cd4aaceb 57:2efc27d87e1c
   228 		return EInsufficientSystemMemory;
   228 		return EInsufficientSystemMemory;
   229 	}
   229 	}
   230 
   230 
   231 	if(minusone != wcstombs(buf, (const wchar_t*)aSrc, wlen*2))
   231 	if(minusone != wcstombs(buf, (const wchar_t*)aSrc, wlen*2))
   232 	{
   232 	{
   233 	  aDes.Copy((const unsigned char *)buf, wlen*2);		
   233 	    if (KErrNone == aDes.Create(wlen*2))
       
   234 	    {
       
   235 	    	aDes.Copy((const unsigned char *)buf, wlen*2);	
       
   236 	    }
       
   237 		else 
       
   238 		{
       
   239 			retval = EInsufficientSystemMemory;
       
   240 		}			
   234 	}
   241 	}
   235 	else
   242 	else
   236 	{
   243 	{
   237 		retval = EInvalidWCSSequence;
   244 		retval = EInvalidWCSSequence;
   238 	}
   245 	}