You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int EXPORT_OUT_API SMO_getSystemAttribute(SMO_Handle p_handle, int periodIndex,
SMO_systemAttribute attr, float **outValueArray, int *length)
//
// Purpose: For the system at given time, get a particular attribute.
//
{
int errorcode = 0;
float temp;
data_t *p_data;
p_data = (data_t *)p_handle;
if (p_data == NULL)
errorcode = -1;
else if (periodIndex < 0 || periodIndex >= p_data->Nperiods)
errorcode = 422;
else {
// don't need to loop since there's only one system
temp = getSystemValue(p_data, periodIndex, attr);
*outValueArray = &temp;
*length = 1;
}
return set_error(p_data->error_handle, errorcode);
}
Reviewing this section of code from swmm solver, I think float temp should be float* temp instead because outValueArray is a double pointer.
Reviewing this section of code from swmm solver, I think float temp should be
float* temp
instead because outValueArray is a double pointer.@michaeltryby @cbuahin
This error is not caught because there isn't an unit test for
get_system_attribute
The text was updated successfully, but these errors were encountered: