X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2FOscilloscope%2FOscilloscopeC.nc;h=3003b594133ea8dccb2ca4be3825a3679703f82f;hb=2bba3c3f09b597a543eefa002c1c8789d5db0c89;hp=c4e0a1c0dc90ab0949860478dc91095e0f93189b;hpb=2df40bbea3c314cf5288abb0a131a1d9aa22c681;p=tinyos-2.x.git diff --git a/apps/Oscilloscope/OscilloscopeC.nc b/apps/Oscilloscope/OscilloscopeC.nc index c4e0a1c0..3003b594 100644 --- a/apps/Oscilloscope/OscilloscopeC.nc +++ b/apps/Oscilloscope/OscilloscopeC.nc @@ -136,6 +136,7 @@ implementation data = 0xffff; report_problem(); } - local.readings[reading++] = data; + if (reading < NREADINGS) + local.readings[reading++] = data; } }