Skip to content

Commit

Permalink
[CLI] Ensure defaults for String ^ type values in RegisteredEvent
Browse files Browse the repository at this point in the history
… and `VariableRequest` structs (fixes possible null exceptions in some cases).
  • Loading branch information
mpaperno committed Mar 1, 2024
1 parent 5e1d663 commit dbd4c46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/WASimClient_CLI/Structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ namespace WASimCommander::CLI::Structs
{
public:
UInt32 eventId;
String ^code;
String ^name;
String ^ code {};
String ^ name {};

RegisteredEvent() {}
explicit RegisteredEvent(UInt32 eventId, String ^code) :
Expand Down Expand Up @@ -506,8 +506,8 @@ namespace WASimCommander::CLI::Structs
{
public:
SByte variableType { 'L' };
String ^ variableName;
String ^ unitName;
String ^ variableName {};
String ^ unitName {};
int variableId { -1 };
int unitId { -1 };
Byte simVarIndex { 0 };
Expand Down

0 comments on commit dbd4c46

Please sign in to comment.