From 8ff66112d9c671c44603e2c8f1dd0dc803d9d6f9 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 5 Dec 2012 20:50:19 +0100 Subject: [PATCH] common: Silly MSVC --- src/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index 3152669df..3f9dedd91 100644 --- a/src/common.h +++ b/src/common.h @@ -70,10 +70,11 @@ int giterr_set_regex(const regex_t *regex, int error_code); */ GIT_INLINE(bool) giterr__check_version(const void *structure, unsigned int expected_max, const char *name) { + unsigned int actual = *(const unsigned int*)structure; + if (!structure) return true; - unsigned int actual = *(const unsigned int*)structure; if (actual > 0 && actual <= expected_max) return true; -- 2.39.5