mirror of https://github.com/YosysHQ/nextpnr.git
sdc: Fix EOF handling during string parse
Fixes #1490 Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
f74aee7047
commit
ff695f26d5
|
|
@ -186,8 +186,12 @@ struct SDCParser
|
|||
s += c;
|
||||
|
||||
while (true) {
|
||||
if (eof())
|
||||
log_error("EOF while parsing string '%s'\n", s.c_str());
|
||||
if (eof()) {
|
||||
if (in_quotes || in_braces || escaped)
|
||||
log_error("EOF while parsing string '%s'\n", s.c_str());
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
char c = peek();
|
||||
if (!in_quotes && !in_braces && !escaped && (std::isblank(c) || c == ']')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue