Commit 9c46409d38b36ba822b4ddf6e5a00256f07b116b

Philip Kelley 2014-06-26T08:01:01

Merge pull request #2444 from libgit2/phkelley/flexarray Fixes #2443 Zero size arrays are an extension

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/refs.h b/src/refs.h
index f75a4bf..a46b219 100644
--- a/src/refs.h
+++ b/src/refs.h
@@ -63,7 +63,7 @@ struct git_reference {
 	} target;
 
 	git_oid peel;
-	char name[0];
+	char name[GIT_FLEX_ARRAY];
 };
 
 git_reference *git_reference__set_name(git_reference *ref, const char *name);