From 992be55e694fdebb51e52d22e2329d75b1e56d0c Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 3 Jan 2015 13:36:14 -0800 Subject: [PATCH 1/2] Fix segfaults by making this a plString. --- Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h b/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h index 8f74183b..086a90f6 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h @@ -57,7 +57,8 @@ private: plLocation fId; uint8_t fFlags; - std::string fDesc; // description of room + plString fDesc; // description of room + public: plNetGroupId() : fFlags(0) {} From 048cb49fd3a16013fa3bb1abda8f2e171348984d Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 3 Jan 2015 13:37:05 -0800 Subject: [PATCH 2/2] plStrings are non-POD objects. --- Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp index c514555a..b5edf383 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp @@ -1791,7 +1791,7 @@ bool plSimpleStateVariable::IWriteData(hsStream* s, float timeConvert, int idx, { // hsAssert(false, "plSimpleStateVariable::WriteData doesn't contain data?"); plNetApp::StaticWarningMsg("plSimpleStateVariable::WriteData Var %s doesn't contain data?", - GetName()); + GetName().c_str()); } #endif @@ -1961,7 +1961,7 @@ bool plSimpleStateVariable::WriteData(hsStream* s, float timeConvert, uint32_t w { // hsAssert(false, "plSimpleStateVariable::WriteData Var doesn't contain data?"); plNetApp::StaticWarningMsg("plSimpleStateVariable::WriteData Var %s doesn't contain data?", - GetName()); + GetName().c_str()); } #endif