Commit a98e36f8aab1cd0a9af54f7f7e881fed9f9558ba

Stefan Sperling 2020-03-18T16:11:28

fix inverted error check in readodelta()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libexec/got-index-pack/got-index-pack.c b/libexec/got-index-pack/got-index-pack.c
index 752b92d..486fe19 100644
--- a/libexec/got-index-pack/got-index-pack.c
+++ b/libexec/got-index-pack/got-index-pack.c
@@ -572,7 +572,7 @@ readodelta(FILE *f, Object *o, off_t nd, off_t p, int flag)
 		goto error;
 	}
 
-	if (got_inflate_to_mem(&d, &n, f) == NULL)
+	if (got_inflate_to_mem(&d, &n, f) != NULL)
 		goto error;
 	o->len = ftello(f) - o->off;
 	if(d == NULL || n != nd)