stagit-index: owner is one line, strip newline
authorHiltjo Posthuma <hiltjo@codemadness.org>
Tue, 5 Jan 2016 20:41:03 +0000 (21:41 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Tue, 5 Jan 2016 20:41:03 +0000 (21:41 +0100)
stagit-index.c

index 356f08c316733a61d5bee911f5faef9c3436ef17..7eb74ea0ab8c0b85cb5b3ff33c2abc78e1e6bc0c 100644 (file)
@@ -221,6 +221,7 @@ main(int argc, char *argv[])
                if (fp) {
                        if (!fgets(owner, sizeof(owner), fp))
                                owner[0] = '\0';
+                       owner[strcspn(owner, "\n")] = '\0';
                        fclose(fp);
                }
                writelog(stdout);