From: drowe67 Date: Tue, 23 Oct 2012 09:26:30 +0000 (+0000) Subject: fixed wrong window dimensions, was reading past endof array and writing past end... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=b9fccf3482f949e129881e586c2cedf00c049400;p=freetel-svn-tracking.git fixed wrong window dimensions, was reading past endof array and writing past end of bit map git-svn-id: https://svn.code.sf.net/p/freetel/code@795 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp b/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp index 0d0e2f00..2339b522 100644 --- a/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp +++ b/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp @@ -312,9 +312,11 @@ void PlotWaterfall::plotPixelData() { wxNativePixelData::Iterator rowStart = p; - for(px = 0; px < m_rCtrl.GetWidth(); px++) + for(px = 0; px < m_rGrid.GetWidth(); px++) { index = px * spec_index_per_px; + assert(index < FDMDV_NSPEC); + intensity = intensity_per_dB * (g_avmag[index] - MIN_DB); if(intensity > 255) intensity = 255; if (intensity < 0) intensity = 0;