From d1c6ccfe61bb7759553864b8746b027dbf8649cf Mon Sep 17 00:00:00 2001 From: qrp73 Date: Tue, 8 Oct 2019 05:03:38 +0300 Subject: [PATCH] fix hardcoded array length --- plot.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plot.c b/plot.c index a447e42..eaa0840 100644 --- a/plot.c +++ b/plot.c @@ -853,8 +853,9 @@ void plot_into_index(float measured[2][101][2]) if (!trace[t].enabled) continue; int n = trace[t].channel; - trace_index[t][i] = trace_into_index(x, t, i, - measured[n], frequencies, sweep_points); + trace_index[t][i] = trace_into_index( + x, t, i, + measured[n], frequencies, sweep_points); } } #if 0 @@ -1429,8 +1430,9 @@ cell_draw_marker_info(int m, int n, int w, int h) trace_get_info(t, buf, sizeof buf); cell_drawstring_5x7(w, h, buf, xpos, ypos, config.trace_color[t]); xpos += 64; - trace_get_value_string(t, buf, sizeof buf, - idx, measured[trace[t].channel], frequencies, 101); + trace_get_value_string( + t, buf, sizeof buf, + idx, measured[trace[t].channel], frequencies, sweep_points); cell_drawstring_5x7(w, h, buf, xpos, ypos, config.trace_color[t]); j++; }