aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 60c6bb8..681824f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -55,12 +55,18 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
// Support git-svn author files, too
// - svn2git native: loginname Joe User <user@example.com>
// - git-svn: loginname = Joe User <user@example.com>
- int rightspace = space;
- if (line.indexOf(" = ") == space)
- rightspace += 2;
+ int rightspace = line.indexOf(" = ");
+ int leftspace = space;
+ if (rightspace == -1) {
+ rightspace = space;
+ } else {
+ leftspace = rightspace;
+ rightspace += 2;
+ }
QByteArray realname = line.mid(rightspace).trimmed();
- line.truncate(space);
+ line.truncate(leftspace);
+
result.insert(line, realname);
};
file.close();