mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-15 13:28:59 +00:00
Fix infinite loop in abc command under emscripten
This commit is contained in:
parent
bd87462b47
commit
9763e4d830
|
@ -550,12 +550,14 @@ std::string replace_tempdir(std::string text, std::string tempdir_name, bool sho
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string selfdir_name = proc_self_dirname();
|
std::string selfdir_name = proc_self_dirname();
|
||||||
|
if (selfdir_name != "/") {
|
||||||
while (1) {
|
while (1) {
|
||||||
size_t pos = text.find(selfdir_name);
|
size_t pos = text.find(selfdir_name);
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
break;
|
break;
|
||||||
text = text.substr(0, pos) + "<yosys-exe-dir>/" + text.substr(pos + GetSize(selfdir_name));
|
text = text.substr(0, pos) + "<yosys-exe-dir>/" + text.substr(pos + GetSize(selfdir_name));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue