aboutsummaryrefslogtreecommitdiffstats
path: root/icetime/icetime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'icetime/icetime.cc')
-rw-r--r--icetime/icetime.cc7
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"))