fixed casting and non initalised array
This commit is contained in:
@@ -127,6 +127,7 @@ bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI &data) {
|
||||
if (ok) {
|
||||
level++;
|
||||
uint32 n_inputs = data.GetNumberOfChildren();
|
||||
inputSignalTypes = new TypeDescriptor[n_inputs];
|
||||
comparators = new comparator_t[n_inputs];
|
||||
StreamString strbuff;
|
||||
TypeDescriptor td;
|
||||
@@ -154,6 +155,7 @@ bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI &data) {
|
||||
"Wrong value for field Type from InputSignals[%d]", i);
|
||||
break;
|
||||
}
|
||||
inputSignalTypes[i] = td;
|
||||
strbuff = "";
|
||||
ok = data.Read("Comparator", strbuff);
|
||||
if (!ok) {
|
||||
@@ -307,6 +309,9 @@ bool JAConditionalSignalUpdateGAM::Compare(MARTe::uint32 index) {
|
||||
if (inputSignalTypes[index] == MARTe::UnsignedInteger32Bit) {
|
||||
return Compare<MARTe::uint32>(index);
|
||||
}
|
||||
if (inputSignalTypes[index] == MARTe::UnsignedInteger8Bit) {
|
||||
return Compare<MARTe::uint8>(index);
|
||||
}
|
||||
return Compare<MARTe::uint16>(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user