Fix model restore crash, bug1013.

This commit is contained in:
Wilson Snyder 2015-12-14 19:58:22 -05:00
parent 849c1e46a2
commit e8b5001cfe
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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