X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/41f9c4e2f66252c83c6524fa4a346839d4c454b2..d2e20e38141c882e46eaa77f172fc2ae37a19d3b:/ui-blob.c?ds=inline diff --git a/ui-blob.c b/ui-blob.c index c59fbcb..1da43c8 100644 --- a/ui-blob.c +++ b/ui-blob.c @@ -8,6 +8,7 @@ */ #include "cgit.h" +#include "ui-blob.h" #include "html.h" #include "ui-shared.h" @@ -80,7 +81,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head) struct commit *commit; struct pathspec_item path_items = { .match = path, - .len = strlen(path) + .len = path ? strlen(path) : 0 }; struct pathspec paths = { .nr = 1,