Bugfix in Verilog string handling
authorClifford Wolf <clifford@clifford.at>
Sat, 5 Jan 2019 11:10:24 +0000 (12:10 +0100)
committerClifford Wolf <clifford@clifford.at>
Sat, 5 Jan 2019 11:10:24 +0000 (12:10 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/verilog/verilog_lexer.l

index f9118e1421e4566705f0234cd0e54f3553551239..1b1873e242da2292063ccc60274b21f602bbd21e 100644 (file)
@@ -274,7 +274,7 @@ YOSYS_NAMESPACE_END
                yystr[j++] = yystr[i++];
        }
        yystr[j] = 0;
-       frontend_verilog_yylval.string = new std::string(yystr);
+       frontend_verilog_yylval.string = new std::string(yystr, j);
        free(yystr);
        return TOK_STRING;
 }