From: jwhui Date: Wed, 18 Apr 2007 15:12:45 +0000 (+0000) Subject: - Fix bug found by Guillermo De Cesco. The buffer pointer was not X-Git-Tag: tinyos/2.0.1~37 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=2b13be90eba6fb280bb38e67386d528c0ed93082 - Fix bug found by Guillermo De Cesco. The buffer pointer was not being updated properly when reading across multiple records. --- diff --git a/tos/chips/stm25p/Stm25pLogP.nc b/tos/chips/stm25p/Stm25pLogP.nc index 192b01b3..d00dee06 100644 --- a/tos/chips/stm25p/Stm25pLogP.nc +++ b/tos/chips/stm25p/Stm25pLogP.nc @@ -290,7 +290,7 @@ implementation { read_addr &= ~BLOCK_MASK; } else { - buf = m_log_state[ client ].buf; + buf = m_log_state[ client ].buf + m_log_state[ client ].len - m_len; // truncate if record is shorter than requested length if ( m_log_info[ client ].remaining < m_len ) len = m_log_info[ client ].remaining;