browserplugins/browsersysteminfoplugin/src/SystemInfoPlugin.cpp
changeset 18 4530440261a8
parent 0 84ad3b177aa3
equal deleted inserted replaced
15:e45c3f40ea5f 18:4530440261a8
   609 
   609 
   610 void CSystemInfoPlugin::DesToNpvariant(TPtr8& string, NPVariant*& variant)
   610 void CSystemInfoPlugin::DesToNpvariant(TPtr8& string, NPVariant*& variant)
   611 {
   611 {
   612     char* newString = NULL;
   612     char* newString = NULL;
   613     if (string.Length()) {
   613     if (string.Length()) {
   614         newString = new char(string.Length());
   614         newString = new char[string.Length()];
   615     }
   615     }
   616     if (newString) {
   616     if (newString) {
   617         Mem::Copy(newString, string.Ptr(), string.Length());
   617         Mem::Copy(newString, string.Ptr(), string.Length());
   618         STRINGN_TO_NPVARIANT(newString, string.Length(), *variant);
   618         STRINGN_TO_NPVARIANT(newString, string.Length(), *variant);
   619     }
   619     }