diff options
| author | Vicent Marti <tanoku@gmail.com> | 2012-12-05 20:50:19 +0100 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2012-12-05 20:50:19 +0100 |
| commit | 8ff66112d9c671c44603e2c8f1dd0dc803d9d6f9 (patch) | |
| tree | a7a07798a8ecf5765a837b6410c73d87045662e7 /src/common.h | |
| parent | e05ca13f1f3550f59790c0f992841abceee1b4c5 (diff) | |
| download | libgit2-8ff66112d9c671c44603e2c8f1dd0dc803d9d6f9.tar.gz | |
common: Silly MSVC
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
