X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-pickaxe.c;h=286919e71428049eda1449ba71ac81667ebc3f7d;hb=a989a5ef2cc30dc623478bd9353c6e1c68e1c5ca;hp=cfcce315babb0edb7ad7be7f2ab2437aaf41eb9d;hpb=028e0491c07f8628d3c94ef01762ad695cc4efa3;p=git.git diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index cfcce315b..286919e71 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -5,8 +5,6 @@ #include "diff.h" #include "diffcore.h" -#include - static unsigned int contains(struct diff_filespec *one, const char *needle, unsigned long len, regex_t *regexp) @@ -16,6 +14,8 @@ static unsigned int contains(struct diff_filespec *one, const char *data; if (diff_populate_filespec(one, 0)) return 0; + if (!len) + return 0; sz = one->size; data = one->data;