Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-for-each-ref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index c904ac3101..00afe89317 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -113,7 +113,7 @@ static int parse_atom(const char *atom, const char *ep)
* table.
*/
const char *formatp = strchr(sp, ':');
- if (!formatp)
+ if (!formatp || ep < formatp)
formatp = ep;
if (len == formatp - sp && !memcmp(valid_atom[i].name, sp, len))
break;