Browse Source

Scrub the last StrToAnsi from AgeInfo conversions

Adam Johnson 10 years ago
parent
commit
b6bbf8419a
  1. 8
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.h
  2. 22
      Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp

8
Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.h

@ -104,10 +104,10 @@ struct NetAgeInfo {
wchar_t ageInstName[kMaxAgeNameLength]; wchar_t ageInstName[kMaxAgeNameLength];
wchar_t ageUserName[kMaxAgeNameLength]; wchar_t ageUserName[kMaxAgeNameLength];
wchar_t ageDesc[1024]; wchar_t ageDesc[1024];
uint32_t ageSequenceNumber; uint32_t ageSequenceNumber;
uint32_t ageLanguage; uint32_t ageLanguage;
uint32_t population; // only used with GetPublicAgeList query results uint32_t population; // only used with GetPublicAgeList query results
uint32_t currentPopulation; // only used with GetPublicAgeList query results uint32_t currentPopulation; // only used with GetPublicAgeList query results
}; };
/***************************************************************************** /*****************************************************************************

22
Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp

@ -167,20 +167,14 @@ void plAgeInfoStruct::CopyFrom( const plVaultAgeInfoNode * node )
//============================================================================ //============================================================================
void plAgeInfoStruct::CopyFrom(const NetAgeInfo & info) { void plAgeInfoStruct::CopyFrom(const NetAgeInfo & info) {
char tmp[MAX_PATH]; // Filename
SetAgeFilename(plString::FromWchar(info.ageFilename));
// Filename // InstanceName
StrToAnsi(tmp, info.ageFilename, arrsize(tmp)); SetAgeInstanceName(plString::FromWchar(info.ageInstName));
SetAgeFilename(tmp); // UserDefinedName
// InstanceName SetAgeUserDefinedName(plString::FromWchar(info.ageUserName));
StrToAnsi(tmp, info.ageInstName, arrsize(tmp)); // Description
SetAgeInstanceName(tmp); SetAgeDescription(plString::FromWchar(info.ageDesc));
// UserDefinedName
StrToAnsi(tmp, info.ageUserName, arrsize(tmp));
SetAgeUserDefinedName(tmp);
// Description
StrToAnsi(tmp, info.ageDesc, arrsize(tmp));
SetAgeDescription(tmp);
plUUID inst(info.ageInstId); plUUID inst(info.ageInstId);
SetAgeInstanceGuid(&inst); SetAgeInstanceGuid(&inst);

Loading…
Cancel
Save