commit ed683d34c04acd7e9ad564a7ed8ca09bfc7df9be
parent 6a8cded7e9b5a35253b26ff53c82ae02a19adbba
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Tue, 15 Sep 2020 12:25:18 +0200
BugFx: ambient contribution was accounted for twice
Diffstat:
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/src/green-output.c b/src/green-output.c
@@ -264,18 +264,6 @@ dump_green_info
k, str_cget(&green->table[i].other_name));
}
}
- if(green->table[green->counts.desc_count].end_weight) {
- double ww = 0, k;
- /* Some paths end here */
- if(fst) fprintf(stream, "<p>E(T) = ");
- else fprintf(stream, " + ");
- fst = 0;
- ww = green->ambient_temp;
- k = (double)green->table[green->counts.desc_count].end_weight
- / (double)green->counts.ok_count;
- t += ww * k;
- fprintf(stream, "%g * <b>Ambient</b>", k);
- }
fprintf(stream, " = %g</p>", t);
/* Counts table */
diff --git a/src/green-types.h b/src/green-types.h
@@ -305,7 +305,7 @@ green_release
FOR_EACH(i, 0, green->counts.ok_count)
release_sample(green->allocator, green->samples + i);
FOR_EACH(i, 0, 1 + green->counts.desc_count)
- release_table_elt(&green->table[i]);
+ if(&green->table[i]) release_table_elt(&green->table[i]);
MEM_RM(green->allocator, green->table);
MEM_RM(green->allocator, green->samples);
green->allocator = NULL;