mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 02:23:19 +02:00
Fix constant string function assignment (#3945)
This commit is contained in:
+2
-2
@@ -2201,8 +2201,8 @@ V3Number& V3Number::opAssignNonXZ(const V3Number& lhs, bool ignoreXZ) {
|
||||
m_data.m_isNull = true;
|
||||
} else if (isString()) {
|
||||
if (VL_UNLIKELY(!lhs.isString())) {
|
||||
// Non-compatible types, erase value.
|
||||
m_data.str() = "";
|
||||
// Numbers can still be strings
|
||||
m_data.str() = lhs.toString();
|
||||
} else {
|
||||
m_data.str() = lhs.m_data.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user