mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-14 21:08:47 +00:00
Merge pull request #680 from jburgess777/fix-empty-string-back-assert
Avoid assert when label is an empty string
This commit is contained in:
commit
82965d60f5
|
@ -799,7 +799,7 @@ static void handle_label(std::string &command, bool &from_to_active, const std::
|
|||
while (pos < GetSize(command) && command[pos] != ' ' && command[pos] != '\t' && command[pos] != '\r' && command[pos] != '\n')
|
||||
label += command[pos++];
|
||||
|
||||
if (label.back() == ':' && GetSize(label) > 1)
|
||||
if (GetSize(label) > 1 && label.back() == ':')
|
||||
{
|
||||
label = label.substr(0, GetSize(label)-1);
|
||||
command = command.substr(pos);
|
||||
|
|
Loading…
Reference in a new issue