Skip to content

Commit

Permalink
- fixed memory leak in simulation results compare function
Browse files Browse the repository at this point in the history
 - updated some tests 


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15023 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Willi Braun committed Jan 31, 2013
1 parent b37de6f commit 358bcc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Compiler/runtime/SimulationResultsCmp.c
Expand Up @@ -324,7 +324,11 @@ unsigned int cmpData(char* varname, DataField *time, DataField *reftime, DataFie
refevent = 0;
t_event = t + t*reltol*0.1;
/* do not exceed next time step */
t_event = (t_event > time->data[i+1])?time->data[i+1]:t_event;
if (i+1<=data->n) {
t_event = (t_event > time->data[i])?time->data[i]:t_event;
}else{
t_event = (t_event > time->data[i+1])?time->data[i+1]:t_event;
}
j_event = j;
while(tr < t_event) {
if (j+1<reftime->n) {
Expand Down

0 comments on commit 358bcc2

Please sign in to comment.