diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-06-14 09:34:06 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-06-14 09:34:06 +0200 |
commit | 49e3ad404a28faa1dbcbbc0acf3071bec3d5ddfe (patch) | |
tree | 0cda07cc626a532cd666c67fe7b65e3641f75f6d /icetime | |
parent | c9ea734feb752988edb20fff65e2fc8ded282b88 (diff) | |
download | icestorm-49e3ad404a28faa1dbcbbc0acf3071bec3d5ddfe.tar.gz icestorm-49e3ad404a28faa1dbcbbc0acf3071bec3d5ddfe.tar.bz2 icestorm-49e3ad404a28faa1dbcbbc0acf3071bec3d5ddfe.zip |
Bugfix in icetime .pcf parser
Diffstat (limited to 'icetime')
-rw-r--r-- | icetime/icetime.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc index b95c2fe..ad54f53 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -177,8 +177,11 @@ void read_pcf(const char *filename) while (fgets(buffer, 128, f)) { - if (buffer[0] == '#') - continue; + for (int i = 0; buffer[i]; i++) + if (buffer[i] == '#') { + buffer[i] = 0; + break; + } const char *tok = strtok(buffer, " \t\r\n"); if (tok == nullptr || strcmp(tok, "set_io")) |