Commit 00530cfb2a244d0bb8246b9c85f9b411a2ff75da

Stefan Sperling 2018-06-21T21:10:38

don't quit loop too early in got_object_open_by_path()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 */