From 2b79faaeabc185d8e51d4afb624cfac8e4060b39 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Wed, 7 Oct 2020 13:32:32 +0200 Subject: [PATCH] Protect THD --- plot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plot.c b/plot.c index 507b8de..156fe69 100644 --- a/plot.c +++ b/plot.c @@ -2085,7 +2085,7 @@ static void cell_draw_marker_info(int x0, int y0) active = 2; for (int i = 0; i < MARKER_COUNT; i++) { if (i >= 2 && setting.measurement == M_THD) { - if (i == 2) { + if (i == 2 && (markers[0].index << 5) > sweep_points ) { int old_unit = setting.unit; setting.unit = U_WATT; float p = value((actual_t[markers[0].index]));