aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rtlil.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 94dbf31c0..a5fbfeda4 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -3438,7 +3438,7 @@ void RTLIL::SigSpec::extend_u0(int width, bool is_signed)
if (width_ < width) {
RTLIL::SigBit padding = width_ > 0 ? (*this)[width_ - 1] : RTLIL::State::Sx;
- if (!is_signed)
+ if (padding != RTLIL::State::Sx && !is_signed)
padding = RTLIL::State::S0;
while (width_ < width)
append(padding);