diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-08-01 11:30:21 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-08-01 11:30:21 -0400 |
commit | 9fb8bf5ca96882cc17f9e4af27ece5268023c1bc (patch) | |
tree | bc0f9480f1181754f73a38cc68ac7433248c35e3 | |
parent | da12f6a4584c4bdd386a420a81bbb51d0f94c12f (diff) |
Set return value to zero, if the PR ID is negative in
`create_pull_request_dir()`.
-rw-r--r-- | git.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -285,7 +285,7 @@ file **get_branch_commits(git_branch *br) { } int create_pull_request_dir(pull_request *pr, int id, const char *root) { - int ret = id; + int ret = (id >= 0) ? id : 0; struct stat st; file **commits; char *pr_dir; |