From: Clifford Wolf Date: Mon, 28 Nov 2016 13:45:05 +0000 (+0100) Subject: Bugfix in "read_verilog -D NAME=VAL" handling X-Git-Tag: yosys-0.8~575 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7f6fb6e17dca8171c4ef08b30ae96e2404de78a;p=yosys.git Bugfix in "read_verilog -D NAME=VAL" handling --- diff --git a/frontends/verilog/verilog_frontend.cc b/frontends/verilog/verilog_frontend.cc index 3c9ed7ee3..2a1dce389 100644 --- a/frontends/verilog/verilog_frontend.cc +++ b/frontends/verilog/verilog_frontend.cc @@ -303,10 +303,10 @@ struct VerilogFrontend : public Frontend { } if (arg == "-D" && argidx+1 < args.size()) { std::string name = args[++argidx], value; - size_t equal = name.find('=', 2); + size_t equal = name.find('='); if (equal != std::string::npos) { - value = arg.substr(equal+1); - name = arg.substr(0, equal); + value = name.substr(equal+1); + name = name.substr(0, equal); } defines_map[name] = value; continue;