aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds/select.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-12-04 14:14:05 +0100
committerClifford Wolf <clifford@clifford.at>2013-12-04 14:14:05 +0100
commit93a70959f3f67ffcee8159b18a5f68904e32a074 (patch)
tree1bf68c1a36c3d126fdb396b0ea9c06bcdc2040fb /passes/cmds/select.cc
parenta2d053694b6269bab8871a810142943fac6a3a18 (diff)
downloadyosys-93a70959f3f67ffcee8159b18a5f68904e32a074.tar.gz
yosys-93a70959f3f67ffcee8159b18a5f68904e32a074.tar.bz2
yosys-93a70959f3f67ffcee8159b18a5f68904e32a074.zip
Replaced RTLIL::Const::str with generic decoder method
Diffstat (limited to 'passes/cmds/select.cc')
-rw-r--r--passes/cmds/select.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/cmds/select.cc b/passes/cmds/select.cc
index 3c3087a95..137f8618a 100644
--- a/passes/cmds/select.cc
+++ b/passes/cmds/select.cc
@@ -48,7 +48,9 @@ static bool match_ids(RTLIL::IdString id, std::string pattern)
static bool match_attr_val(const RTLIL::Const &value, std::string pattern)
{
- if (!fnmatch(pattern.c_str(), value.str.c_str(), FNM_NOESCAPE))
+ if ((value.flags & RTLIL::CONST_FLAG_STRING) == 0)
+ return false;
+ if (!fnmatch(pattern.c_str(), value.decode_string().c_str(), FNM_NOESCAPE))
return true;
return false;
}