Fix VCD open with empty filename, #2198.

This commit is contained in:
Wilson Snyder 2020-03-24 17:32:47 -04:00
parent 75ebe7a4be
commit 08a51e3e09
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix parameter type redeclaring a type, #2195. [hdzhangdoc]
**** Fix VCD open with empty filename, #2198. [Julius Baxter]
* Verilator 4.030 2020-03-08

View File

@ -156,10 +156,10 @@ VerilatedVcd::VerilatedVcd(VerilatedVcdFile* filep)
void VerilatedVcd::open(const char* filename) {
m_assertOne.check();
if (isOpen() || !filename || !*filename) return;
if (isOpen()) return;
// Set member variables
m_filename = filename;
m_filename = filename; // "" is ok, as someone may overload open
VerilatedVcdSingleton::pushVcd(this);
// SPDIFF_OFF