aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a00c6dc..0edf8f5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -41,7 +41,11 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
}
while (!file.atEnd()) {
- QByteArray line = file.readLine().trimmed();
+ QByteArray line = file.readLine();
+ int comment_pos = line.indexOf('#');
+ if (comment_pos != -1)
+ line.truncate(comment_pos);
+ line = line.trimmed();
int space = line.indexOf(' ');
if (space == -1)
continue; // invalid line