don't quit loop too early in got_object_open_by_path()
diff --git a/lib/object.c b/lib/object.c
index d5e33de..b6a155e 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -1447,7 +1447,8 @@ got_object_open_by_path(struct got_object **obj, struct got_repository *repo,
if (*s != '/') {
s++;
- continue;
+ if (*s)
+ continue;
}
/* end of path segment */