stagit-index: owner is one line, strip newline - stagit-gopher - A git gopher f… | |
git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2h… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit f17def25bed839664b3242b5f31792d3aa1f53c6 | |
parent 289ecda4aa8688b65300ae647912d791246e4abd | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Tue, 5 Jan 2016 21:41:03 +0100 | |
stagit-index: owner is one line, strip newline | |
Diffstat: | |
M stagit-index.c | 1 + | |
1 file changed, 1 insertion(+), 0 deletions(-) | |
--- | |
diff --git a/stagit-index.c b/stagit-index.c | |
@@ -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); |