diff --git a/Changes b/Changes index 5e88ffba0..7591fe19b 100644 --- a/Changes +++ b/Changes @@ -33,6 +33,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix $bitstoreal constant propagation, bug1012. [Jonathan Kimmitt] +**** Fix model restore crash, bug1013. [Jason McMullan] + * Verilator 3.878 2015-11-01 diff --git a/include/verilated_save.cpp b/include/verilated_save.cpp index 0807600ca..fcba60f79 100644 --- a/include/verilated_save.cpp +++ b/include/verilated_save.cpp @@ -201,7 +201,7 @@ void VerilatedRestore::fill() { if (VL_UNLIKELY(!isOpen())) return; // Move remaining characters down to start of buffer. (No memcpy, overlaps allowed) vluint8_t* rp = m_bufp; - for (vluint8_t* sp=m_cp; rp < m_endp;) *rp++ = *sp++; // Overlaps + for (vluint8_t* sp=m_cp; sp < m_endp;) *rp++ = *sp++; // Overlaps m_endp = m_bufp + (m_endp - m_cp); m_cp = m_bufp; // Reset buffer // Read into buffer starting at m_endp